index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2017-07-03 09:12:36 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-07-03 09:12:36 +0200 |
commit | f374df980982f59185a3de2b9cef8164bf837593 (patch) | |
tree | 0ada9f0d95229ec45c28a948b6ce464eb8dff27a /bin/cleanup | |
parent | e393c7341d40671476cbc3c75de02f60d77779eb (diff) |
-rwxr-xr-x | bin/cleanup | 7 |
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 |