diff --git a/Build/AtlasBuildScripts/checkout_Gaudi.sh b/Build/AtlasBuildScripts/checkout_Gaudi.sh index a536cf4c3b6273dc7f665607b3edd27c644cf613..15851ec1313fd6724f8cc39a2e9b61e2cd9146f7 100755 --- a/Build/AtlasBuildScripts/checkout_Gaudi.sh +++ b/Build/AtlasBuildScripts/checkout_Gaudi.sh @@ -18,6 +18,13 @@ usage() { echo " -t branch/tag: Mandatory branch/tag/hash to check out" echo " -s directory: Mandatory source directory to use" echo " -e url: Optional source URL to use for the checkout" + echo + echo " This script will allow the environment variables" + echo " Gaudi_URL and Gaudi_REF to override" + echo " other values (even those on the command line)" + echo " If Gaudi_URL is set to 'current' then" + echo " no clone or checkout is done and the working copy" + echo " in the source directory is left untouched." } # Parse the command line arguments: @@ -52,6 +59,20 @@ while getopts ":t:o:s:e:h" opt; do esac done +if [ "$Gaudi_URL" != "" ]; then + GAUDIURL=$Gaudi_URL + echo "Gaudi URL overridden to $GAUDIURL from environment" + if [ "$Gaudi_URL" = "current" ]; then + echo "Leaving current checkout in place for build" + exit 0 + fi +fi + +if [ "$Gaudi_REF" != "" ]; then + TAGBRANCH=$Gaudi_REF + echo "Gaudi ref overridden to $TAGBRANCH from environment" +fi + # The tag/branch and a source directory must have been specified: if [ "$TAGBRANCH" = "" ] || [ "$SOURCEDIR" = "" ]; then echo "Not all required arguments were provided!" diff --git a/Build/AtlasBuildScripts/checkout_atlasexternals.sh b/Build/AtlasBuildScripts/checkout_atlasexternals.sh index ba9ebadd509ded5bd6220acaf4689984a9867939..a6a6627ed260f44a28670684e2ff881703c244e9 100755 --- a/Build/AtlasBuildScripts/checkout_atlasexternals.sh +++ b/Build/AtlasBuildScripts/checkout_atlasexternals.sh @@ -18,6 +18,13 @@ usage() { echo " -t branch/tag: Mandatory branch/tag/hash to check out" echo " -s directory: Mandatory source directory to use" echo " -e url: Optional source URL to use for the checkout" + echo + echo " This script will allow the environment variables" + echo " AtlasExternals_URL and AtlasExternals_REF to override" + echo " other values (even those on the command line)." + echo " If AtlasExternals_URL is set to 'current' then" + echo " no clone or checkout is done and the working copy" + echo " in the source directory is left untouched." } # Parse the command line arguments: @@ -52,6 +59,20 @@ while getopts ":t:o:s:e:h" opt; do esac done +if [ "$AtlasExternals_URL" != "" ]; then + EXTERNALSURL=$AtlasExternals_URL + echo "Externals URL overridden to $EXTERNALSURL from environment" + if [ "$AtlasExternals_URL" = "current" ]; then + echo "Leaving current checkout in place for build" + exit 0 + fi +fi + +if [ "$AtlasExternals_REF" != "" ]; then + TAGBRANCH=$AtlasExternals_REF + echo "Externals ref overridden to $TAGBRANCH from environment" +fi + # The tag/branch and a source directory must have been specified: if [ "$TAGBRANCH" = "" ] || [ "$SOURCEDIR" = "" ]; then echo "Not all required arguments were provided!"