[pitivi] bin:environment: Do not override user shell preferences



commit 71202aed02b312da1139c6eaa14258cc134ca01b
Author: Thibault Saunier <tsaunier gnome org>
Date:   Mon Sep 29 09:49:28 2014 +0200

    bin:environment: Do not override user shell preferences
    
    https://bugzilla.gnome.org/show_bug.cgi?id=739251

 bin/pitivi-git-environment.sh |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/bin/pitivi-git-environment.sh b/bin/pitivi-git-environment.sh
index 616db78..196f2e3 100755
--- a/bin/pitivi-git-environment.sh
+++ b/bin/pitivi-git-environment.sh
@@ -493,9 +493,14 @@ if [ $ready_to_run == 1 ]; then
       if [ -z "$*" ];
       then
         cd $PITIVI/pitivi
-        cp ~/.bashrc /tmp/ptvCustomPS1
-        echo "export PS1=[ptv]\ \$PS1" >> /tmp/ptvCustomPS1
-        bash --rcfile /tmp/ptvCustomPS1
+        if [ $SHELL != "/bin/bash" ];
+        then
+          PITIVI_ENV="[ptv]" $SHELL
+        else
+          cp ~/.bashrc /tmp/ptvCustomPS1
+          echo "export PS1=[ptv]\ \$PS1" >> /tmp/ptvCustomPS1
+          /bin/bash --rcfile /tmp/ptvCustomPS1
+        fi
       else
         /bin/bash -c "$*"
       fi


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]