get rid of else in updatexo function
This commit is contained in:
@@ -737,7 +737,10 @@ function UpdateXO {
|
|||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
if [[ "$PRESERVE" != "0" ]]; then
|
if [[ "$PRESERVE" == "0" ]]; then
|
||||||
|
printinfo "PRESERVE variable is set to 0. This needs to be at least 1. Not doing a cleanup"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
# remove old builds. leave as many as defined in PRESERVE variable
|
# remove old builds. leave as many as defined in PRESERVE variable
|
||||||
echo
|
echo
|
||||||
@@ -745,9 +748,6 @@ function UpdateXO {
|
|||||||
cmdlog "find $INSTALLDIR/xo-builds/ -maxdepth 1 -type d -name \"xen-orchestra*\" -printf \"%T@ %p\\n\" | sort -n | cut -d' ' -f2- | head -n -$PRESERVE | xargs -r rm -r"
|
cmdlog "find $INSTALLDIR/xo-builds/ -maxdepth 1 -type d -name \"xen-orchestra*\" -printf \"%T@ %p\\n\" | sort -n | cut -d' ' -f2- | head -n -$PRESERVE | xargs -r rm -r"
|
||||||
find $INSTALLDIR/xo-builds/ -maxdepth 1 -type d -name "xen-orchestra*" -printf "%T@ %p\n" | sort -n | cut -d' ' -f2- | head -n -$PRESERVE | xargs -r rm -r >>$LOGFILE 2>&1
|
find $INSTALLDIR/xo-builds/ -maxdepth 1 -type d -name "xen-orchestra*" -printf "%T@ %p\n" | sort -n | cut -d' ' -f2- | head -n -$PRESERVE | xargs -r rm -r >>$LOGFILE 2>&1
|
||||||
printok "Removing old installations. Leaving $PRESERVE latest"
|
printok "Removing old installations. Leaving $PRESERVE latest"
|
||||||
else
|
|
||||||
printinfo "PRESERVE variable is set to 0. This needs to be at least 1. Not doing a cleanup"
|
|
||||||
fi
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user