add logging to couple functions. do git checkout only if branch is not master to prevent unnecessary errorlog entry

This commit is contained in:
ronivay
2018-07-27 17:40:51 +03:00
parent 913d3b9056
commit a73c65cea4

View File

@@ -186,7 +186,7 @@ function InstallXOPlugins {
echo "No plugins to install" echo "No plugins to install"
fi fi
} } 2>$LOGFILE
function InstallXO { function InstallXO {
@@ -220,9 +220,13 @@ function InstallXO {
echo "Fetching source code from branch: $BRANCH ..." echo "Fetching source code from branch: $BRANCH ..."
echo echo
git clone https://github.com/vatesfr/xen-orchestra $INSTALLDIR/xo-builds/xen-orchestra-$TIME git clone https://github.com/vatesfr/xen-orchestra $INSTALLDIR/xo-builds/xen-orchestra-$TIME
if [[ "$BRANCH" != "master" ]]; then
cd $INSTALLDIR/xo-builds/xen-orchestra-$TIME cd $INSTALLDIR/xo-builds/xen-orchestra-$TIME
git checkout $BRANCH git checkout $BRANCH
cd $(dirname $0) cd $(dirname $0)
fi
echo echo
echo "done" echo "done"
@@ -413,7 +417,7 @@ function RollBackInstallation {
esac esac
done done
} } 2>$LOGFILE
function CheckOS { function CheckOS {