From a73c65cea48d6a09d9243c3b084fb871d2262066 Mon Sep 17 00:00:00 2001 From: ronivay Date: Fri, 27 Jul 2018 17:40:51 +0300 Subject: [PATCH] add logging to couple functions. do git checkout only if branch is not master to prevent unnecessary errorlog entry --- xo-install.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/xo-install.sh b/xo-install.sh index ef02d94..f97f669 100755 --- a/xo-install.sh +++ b/xo-install.sh @@ -186,7 +186,7 @@ function InstallXOPlugins { echo "No plugins to install" fi -} +} 2>$LOGFILE function InstallXO { @@ -220,9 +220,13 @@ function InstallXO { echo "Fetching source code from branch: $BRANCH ..." echo git clone https://github.com/vatesfr/xen-orchestra $INSTALLDIR/xo-builds/xen-orchestra-$TIME - cd $INSTALLDIR/xo-builds/xen-orchestra-$TIME - git checkout $BRANCH - cd $(dirname $0) + + if [[ "$BRANCH" != "master" ]]; then + cd $INSTALLDIR/xo-builds/xen-orchestra-$TIME + git checkout $BRANCH + cd $(dirname $0) + fi + echo echo "done" @@ -413,7 +417,7 @@ function RollBackInstallation { esac done -} +} 2>$LOGFILE function CheckOS {