2023-08-03 01:03:20 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-08-03 03:37:23 +03:00
|
|
|
# Use this script if you need to force autobuild to quit before it's done,
|
|
|
|
# or if autobuild exits unexpectedly.
|
|
|
|
|
2023-08-03 01:03:20 +03:00
|
|
|
builddir="/var/tmp/stagebuilder" # Do not use trailing slash here.
|
|
|
|
echo "Unmounting file systems..."
|
2023-08-07 02:51:45 +03:00
|
|
|
if [ "$(ls -A $builddir/stage4/dev)" ]; then umount -l $builddir/stage4/dev{/shm,/pts,}; fi
|
|
|
|
if [ "$(ls -A $builddir/stage4/proc)" ]; then umount -l $builddir/stage4/proc; fi
|
|
|
|
if [ "$(ls -A $builddir/stage4/sys)" ]; then umount -l $builddir/stage4/sys; fi
|
|
|
|
if [ "$(ls -A $builddir/stage4/run)" ]; then umount -l $builddir/stage4/run; fi
|
2023-08-03 01:03:20 +03:00
|
|
|
echo "Removing stage4 build dir..."
|
2023-08-07 02:51:45 +03:00
|
|
|
if [ "$(ls -A $builddir/stage4/)" ]; then rm -rf $builddir/stage4/*; fi
|
|
|
|
echo "Done."
|
|
|
|
echo "Removing binpkg dir..."
|
|
|
|
rm -rf $builddir/binpkgs/*
|
|
|
|
echo "Done."
|
2023-08-03 01:03:20 +03:00
|
|
|
echo "Cleanup complete."
|