diff --git a/sample.xo-install.cfg b/sample.xo-install.cfg index be804f3..b6b6e12 100644 --- a/sample.xo-install.cfg +++ b/sample.xo-install.cfg @@ -15,7 +15,7 @@ CONFIGUPDATE=true # Location of Xen Orchestra repository where source code is fetched REPOSITORY="https://github.com/vatesfr/xen-orchestra" -# Git branch or tag (append tags/ before the tag name) where xen-orchestra sources are fetched. +# Git branch, tag (append tags/ before the tag name) or individual commit where xen-orchestra sources are fetched. # Also, you can set this to "release" to use the latest tagged branch. BRANCH="master" diff --git a/xo-install.sh b/xo-install.sh index 1ae189c..047ca2e 100755 --- a/xo-install.sh +++ b/xo-install.sh @@ -490,15 +490,14 @@ function InstallXO { echo printinfo "Checking out latest tagged release '$TAG'" - runcmd "git checkout $TAG" + runcmd "cd $INSTALLDIR/xo-builds/xen-orchestra-$TIME && git checkout $TAG" runcmd "cd $(dirname "$0")" # we don't need to do much magic if specific branch set so just checkout elif [[ "$BRANCH" != "master" ]]; then echo - printinfo "Checking out source code from branch '$BRANCH'" + printinfo "Checking out source code from branch/commit '$BRANCH'" - runcmd "cd $INSTALLDIR/xo-builds/xen-orchestra-$TIME" - runcmd "git checkout $BRANCH" + runcmd "cd $INSTALLDIR/xo-builds/xen-orchestra-$TIME && git checkout $BRANCH" runcmd "cd $(dirname "$0")" fi