cp -v binary/live/filesystem.squashfs $BUILD_TARGET/
echo "Now rsyncing results to mgmt1..."
-rsync --password-file /etc/rsynclivebuild-send.pass -avv --delete /srv/mirror/live-build/ rsync://livebuild@10.1.1.1/livebuild/*
+rsync --password-file /etc/rsynclivebuild-send.pass -avv --delete /srv/mirror/live-build/ rsync://livebuild@10.1.1.1/livebuild/
figlet "rsync success"
#
-# cleanup /srv/mirror, keep max number of images
+# cleanup /srv/mirror, keep MAX number of images
#
+MAX=10
cd /srv/mirror/live-build/
COUNT=0
for i in $(ls -artd1 ./${LIVE_TYPE}-*) ; do
let COUNT=COUNT+1
- if [ $COUNT -gt 2 ] ; then
- echo "would rm -rf $i"
+ if [ $COUNT -gt $MAX ] ; then
+ rm -rfv $i
else
- echo "would keep $i"
+ echo "keeping $i"
fi
done