3 ##############################################################################
4 # Removes incomplete or broken nightly build files from the upload directory.
6 #-- Setup & Configuration ----------------------------------------------------
7 ROOT
=/home
/groups
/a
/ar
/aros
8 SRC
="$ROOT/uploads/nightly"
11 #-- Acquire Lock -------------------------------------------------------------
13 if [[ $?
!= 0 ]]; then
14 echo Could not acquire lock. Aborting...
18 #-- Remove Stale Files -------------------------------------------------------
21 count
=$
(($
(ls -1 |
wc -l) - 1))
22 for directory
in *; do
23 if [[ $count -gt 0 ]]; then
29 #-- Release Lock -------------------------------------------------------------