# Build commands
# Remove oldest run
if [ "$FTP_KEEP" != "0" ]; then
- commands="$commands; rmdir ${lastrun}"
+ commands="$commands; rm -rf ${lastrun}"
# Move everything back
for run in `seq $FTP_KEEP -1 2`; do
# Move "old latest" to run-1
commands="$commands; mv latest run-1"
else
- commands="$commands; rmdir latest"
+ commands="$commands; rm -rf latest"
fi
# Create "new latest" directory