--- go-gnome.sh.current Thu Aug 24 21:41:23 2000 +++ go-gnome.sh Thu Aug 24 21:53:40 2000 @@ -121,7 +121,7 @@ } my_uudecode () { - _awkprog="/tmp/uudecode.$$.awk" + _awkprog="${TMPDIR}/uudecode.$$.awk" _uudecode_out=$1 rm -f ${_uudecode_out} @@ -554,7 +554,12 @@ # The action starts here. # -cd /tmp +# Trust the user's TMPDIR. Though it might be safer to insist on a new, mode 0700 dir +if [ -z "${TMPDIR}" ]; then + mkdir -m 0700 /tmp/helixcode.$$ || bail_error "Please run again. Unable to make safe tmp dir" + TMPDIR=/tmp/helixcode.$$ +fi +cd ${TMPDIR} || bail_error "Cannot cd to ${TMPDIR}" # # Step 1 @@ -710,7 +715,7 @@ echo -n "==> Extracting snarf..." -SNARF="/tmp/snarf.$$" +SNARF="${TMPDIR}/snarf.$$" if [ $? -ne 0 ] then bail_temp @@ -728,6 +733,7 @@ fi +cd ${TMPDIR} || bail_error "Cannot cd to ${TMPDIR}" mv $SNARF $SNARF.gz ${_gunzip} $SNARF.gz chmod +x $SNARF @@ -791,7 +797,7 @@ echo -n "==> Fetching the main installation program; please be patient..." -INSTALLER="/tmp/installer.$$" +INSTALLER="${TMPDIR}/installer.$$" if [ $PROC = i686 -o $PROC = i586 -o $PROC = i486 -o $PROC = i386 ] then @@ -817,6 +823,7 @@ # Go, go, go! # +cd ${TMPDIR} || bail_error "Cannot cd to ${TMPDIR}" mv -f $INSTALLER $INSTALLER.gz ${_gunzip} $INSTALLER.gz @@ -829,5 +836,6 @@ echo -n "==> Cleaning up temporary files..." rm -f $INSTALLER rm -f $SNARF -rm -f /var/tmp/rpm-* +echo "You may want to delete files in /var/tmp whose names begin with rpm-" +#rm -f /var/tmp/rpm-* echo "done."