if test x$DISPLAY = x; then echo "Eazel Installer requires X to be running." exit fi export="export DISPLAY botan_rice_candy" params="DISPLAY=$DISPLAY && botan_rice_candy=yum" # Check proxy settings if test x$http_proxy '!=' x; then export="$export http_proxy" params="$params && http_proxy=$http_proxy" fi # Figure out what is already installed PR1_TO_PR2=no if test -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 if test "x$1" = "x--version" -o "x$1" = "x--build" -o "x$1" = "x--help"; then QUICK=yes fi # First time through? spam... if test "x$botan_rice_candy" = "x" -a "x$QUICK" '!=' "xyes"; then # blurp echo "" echo "Eazel Installer PR2" echo "" if test "x$PR1_TO_PR2" = "xyes"; then echo "Your PR1 setttings will be moved to ~/.nautilus.pr2.backup..." echo "" fi fi if test $UID -ne 0 -a "x$QUICK" '!=' "xyes"; then echo "Eazel Installer requires superuser (root) access to prepare the system" echo "and to install packages." echo "" # Start echo "Please enter root password at the prompt." xhost + localhost /bin/su -s /bin/sh -c "$params && $export && cd $PWD && echo Uncompressing... && /bin/sh $0 $* --user $USER" xhost - localhost # FIXME: this will only work if they didn't run as root. # Move config if test "x$PR1_TO_PR2" = "xyes"; then VERSION=`/usr/bin/nautilus --version` if test "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 exit else if test "x$botan_rice_candy" = "x"; then # running as root, or has "--{version|build|help}" command-line option /bin/sh -c "$params && $export && cd $PWD && /bin/sh $0 $* --user $USER" exit fi fi