Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/cleanup
diff options
context:
space:
mode:
Diffstat (limited to 'bin/cleanup')
-rwxr-xr-xbin/cleanup7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/cleanup b/bin/cleanup
index aa93004..f84d687 100755
--- a/bin/cleanup
+++ b/bin/cleanup
@@ -4,6 +4,13 @@
. "${0%/*}/../conf/default.conf"
+# we only clean if run interactive or if no one is logged in
+if ! tty -s && \
+ [ -n "$(users)" ]; then
+ >&2 echo 'Skipping clean up.'
+ exit
+fi
+
if ! "${base_dir}/bin/sanity-check" -r; then
>&2 echo 'Build master is not sane.'
exit 1