Ticket #12926: patch-#12926

File patch-#12926, 868 bytes (added by itaibn, 9 years ago)
Line 
1diff --git a/spkg/bin/sage b/spkg/bin/sage
2--- a/spkg/bin/sage
3+++ b/spkg/bin/sage
4@@ -272,12 +272,6 @@
5     fi
6 
7     cd "$SAGE_ROOT/local/bin"
8-    IPYTHONDIR="$DOT_SAGE/ipython" && export IPYTHONDIR
9-    IPYTHONRC="ipythonrc" && export IPYTHONRC
10-    if [ ! -d "$IPYTHONDIR" ]; then
11-        mkdir -p "$DOT_SAGE"
12-        cp -r "$SAGE_ROOT/ipython" "$DOT_SAGE/"
13-    fi
14     sage-cleaner &>/dev/null &
15 }
16 
17diff --git a/spkg/bin/sage-env b/spkg/bin/sage-env
18--- a/spkg/bin/sage-env
19+++ b/spkg/bin/sage-env
20@@ -519,3 +519,10 @@
21 echo "If any of the above are wrong, or are not optimal, override"
22 echo "them by setting the appropiate enviroment variable."
23 fi
24+
25+IPYTHONDIR="$DOT_SAGE/ipython" && export IPYTHONDIR
26+IPYTHONRC="ipythonrc" && export IPYTHONRC
27+if [ ! -d "$IPYTHONDIR" ]; then
28+    mkdir -p "$DOT_SAGE"
29+    cp -r "$SAGE_ROOT/ipython" "$DOT_SAGE/"
30+fi