summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@gnome.org>2015-09-26 21:21:33 +0200
committerThibault Saunier <tsaunier@gnome.org>2015-09-26 21:45:48 +0200
commiteb82c70ebb7fa472f813dfd8f2f7e0515b063fe7 (patch)
tree74ca34f12d0784213b008fc48854f330c8e1ff77
parent7e3e63a3fdc8a25c6b336dbf3c77068a6b98ef35 (diff)
linux_bundle: Enhance the way we enter bundle environment
Respecting user shell and setting environment PS1
-rw-r--r--cerbero/packages/linux_bundle.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/cerbero/packages/linux_bundle.py b/cerbero/packages/linux_bundle.py
index b9520c4f..c5c3c026 100644
--- a/cerbero/packages/linux_bundle.py
+++ b/cerbero/packages/linux_bundle.py
@@ -48,8 +48,21 @@ if test -z ${APP_IMAGE_TEST}; then
cd ${APPDIR}
${APPDIR}/%(executable_path)s $*
else
- # Run a shell in test mode
- bash;
+ if [ $SHELL = "/bin/zsh" ]; then
+ export ZDOTDIR=$MYPITIVI/.zdotdir
+ mkdir -p $ZDOTDIR
+ cp ~/.zshrc $ZDOTDIR
+ echo "autoload -Uz bashcompinit; bashcompinit" >> $ZDOTDIR/.zshrc
+ echo "PROMPT=[%(appname)s]\ \$PROMPT" >> $ZDOTDIR/.zshrc
+ zsh
+ elif [ $SHELL = "/bin/bash" ]; then
+ RCFILE=$MYPITIVI/.bashrc
+ cp ~/.bashrc $RCFILE
+ echo "export PS1=[%(appname)s]\ \$PS1" >> $RCFILE
+ /bin/bash --rcfile $RCFILE
+ else
+ CERBERO_ENV="[%(appname)s]" $SHELL
+ fi
fi
# Cleaning up the link to gstplugins