summaryrefslogtreecommitdiff
path: root/nautilus-installer
diff options
context:
space:
mode:
authorEskil Heyn Olsen <eskil@src.gnome.org>2000-11-02 23:58:48 +0000
committerEskil Heyn Olsen <eskil@src.gnome.org>2000-11-02 23:58:48 +0000
commitfc218423c4c27e609418c22df49815aafa8f0a1f (patch)
tree670508261a3a130e71d1748725d6347f713787c2 /nautilus-installer
parentafe765760a47c47614ac3b23c037ac6092e34bd8 (diff)
downloadnautilus-fc218423c4c27e609418c22df49815aafa8f0a1f.tar.gz
Fix for 4368, utterly untested though...
* nautilus-installer/src/prescript: Fix for 4368, utterly untested though...
Diffstat (limited to 'nautilus-installer')
-rw-r--r--nautilus-installer/src/prescript75
1 files changed, 53 insertions, 22 deletions
diff --git a/nautilus-installer/src/prescript b/nautilus-installer/src/prescript
index 806f9a926..0e3bb3d10 100644
--- a/nautilus-installer/src/prescript
+++ b/nautilus-installer/src/prescript
@@ -1,35 +1,66 @@
if test x$DISPLAY = x; then
- echo "The Nautilus-Installer requires X"
- exit
+ echo "The Nautilus-Installer requires X"
+ exit
fi
params="DISPLAY=$DISPLAY"
if test x$http_proxy = x; then
- params="$params"
+ params="$params"
else
params="$params http_proxy=$http_proxy"
fi
-if test $UID -ne 0; then
- echo ""
- echo "Eazel Installer PR2"
- echo ""
- echo "Eazel Installer requires superuser (root) access to prepare the system"
- echo "and to install packages."
- echo ""
- echo "Please enter root password at the prompt."
- xhost + localhost
- su - -c "export $params && cd $PWD && echo Uncompressing... && sh $0 $* $USER"
- xhost - localhost
- exit
+
+# Figure out what is already installed
+PR1_TO_PR2=no
+if [ -f /usr/bin/nautilus ]; then
+ VERSION=`/usr/bin/nautilus --version`
+ if [ "x$VERSION" = "xGnome nautilus 0.1.0" ]; then
+ PR1_TO_PR2=yes
+ fi
fi
-# Start the nautilus launcher if needed
-ps ax | grep -w 'nautilus-launcher-applet' > /dev/null 2>&1
+if test $UID -ne 0; then
+
+ # blurp
+ echo ""
+ echo "Eazel Installer PR2"
+ echo ""
+ echo "Eazel Installer requires superuser (root) access to prepare the system"
+ echo "and to install packages."
+ echo ""
+ if [ "x$PR1_TO_PR2" = "xyes" ]; then
+ echo "Your PR1 setttings will be moved to ~/.nautilus.pr2.backup..."
+ echo ""
+ fi
+
+ # Start
+ echo "Please enter root password at the prompt."
+ xhost + localhost
+ su - -c "export $params && cd $PWD && echo Uncompressing... && sh $0 $* $USER"
+ xhost - localhost
-rv=$?
+ # Move config
+ if [ "x$PR1_TO_PR2" = "xyes" ]; then
+ VERSION=`/usr/bin/nautilus --version`
+ if [ "x$VERSION" != "xGnome nautilus 0.1.0" ]; then
+ echo "Saving old settings..."
+ mkdir -p $HOME/.nautilus.pr2.backup >& /dev/null
+ mv -f $HOME/.nautilus $HOME/.nautilus.pr2.backup/ >& /dev/null
+ mv -f $HOME/Nautilus $HOME/.nautilus.pr2.backup/ >& /dev/null
+ mv -f $HOME/.gconf/apps/nautilus/ $HOME/.nautilus.pr2.backup/ >& /dev/null
+ mv -f $HOME/.gconf/apps/eazel-trilobite/ $HOME/.nautilus.pr2.backup/ >& /dev/null
+ fi
+ fi
-echo $rv
+ # Start the nautilus launcher if needed
+ ps ax | grep -w 'nautilus-launcher-applet' > /dev/null 2>&1
+ rv=$?
+ echo $rv
+ if [ $rv -ne 0 ]; then
+ if [ -f /usr/bin/nautilus-launcher-applet ]; then
+ nautilus-launcher-applet &
+ fi
+ fi
-if [ $rv -ne 0 ]
-then
- nautilus-launcher-applet &
+ exit
fi
+