diff options
author | Thibault Saunier <tsaunier@gnome.org> | 2015-09-26 21:21:33 +0200 |
---|---|---|
committer | Thibault Saunier <tsaunier@gnome.org> | 2015-09-26 21:39:55 +0200 |
commit | 4e44a4b601965dd8ca0d00518acb211900551d83 (patch) | |
tree | 55373c81456a51fc37b6e38c47cfc5ebc6c09207 | |
parent | 661cc8b9d5c95bbe3c6b359cf71938e74baa0111 (diff) |
linux_bundle: Enhance the way we enter bundle environment
Respecting user shell and setting environment PS1
-rw-r--r-- | cerbero/packages/linux_bundle.py | 17 |
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 |