trivial diff: RMSTAGECMD in bootcheck
Zoltan Somogyi
zs at cs.mu.oz.au
Mon Dec 22 15:04:21 AEDT 1997
tools/bootcheck:
Allow for the possibility of the failure of the RMSTAGECMD command.
Zoltan.
Index: tools/bootcheck
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/bootcheck,v
retrieving revision 1.43
diff -u -r1.43 bootcheck
--- bootcheck 1997/10/21 14:57:05 1.43
+++ bootcheck 1997/12/12 07:50:30
@@ -115,6 +115,10 @@
PATH=$root/tools:$PATH
export PATH
+# Try the command given by the environment variable RMSTAGECMD to delete
+# stage directories. Since this command may not always work due to
+# security considerations (.rhost files), we execute /bin/rm -fr afterwards
+# in any case.
if test "$RMSTAGECMD" = ""
then
RMSTAGECMD="/bin/rm -fr"
@@ -152,6 +156,7 @@
$RMSTAGECMD $root/stage2_sicstus/library < /dev/null &
wait
$RMSTAGECMD $root/stage2_sicstus/* < /dev/null
+ /bin/rm -fr $root/stage2_sicstus/* < /dev/null
fi
set +x
@@ -279,6 +284,7 @@
$RMSTAGECMD $root/stage2_sicstus/library < /dev/null &
wait
$RMSTAGECMD $root/stage2_sicstus/* < /dev/null
+ /bin/rm -fr $root/stage2_sicstus/* < /dev/null
exit 0
fi
@@ -314,6 +320,7 @@
$RMSTAGECMD $root/stage2/library < /dev/null &
wait
$RMSTAGECMD $root/stage2/* < /dev/null
+ /bin/rm -fr $root/stage2/* < /dev/null
fi
set +x
@@ -438,6 +445,7 @@
$RMSTAGECMD $root/stage3/library < /dev/null &
wait
$RMSTAGECMD $root/stage3/* < /dev/null
+ /bin/rm -fr $root/stage3/* < /dev/null
fi
echo linking stage 3... 1>&2
@@ -536,6 +544,7 @@
$RMSTAGECMD $root/stage3/library < /dev/null &
wait
$RMSTAGECMD $root/stage3/* < /dev/null
+ /bin/rm -fr $root/stage3/* < /dev/null
fi
# since we may have removed the stage3 library, use the one in stage2
@@ -572,7 +581,6 @@
else
test_status=0
fi
-
echo "finishing at `date`"
More information about the developers
mailing list