From aef0c3216d32061ce29c54c5c73cad3498151fae Mon Sep 17 00:00:00 2001 From: Max Turri Date: Mon, 20 May 2024 15:59:35 -0700 Subject: [PATCH] IT-5368 Updated installCCS.sh script to work on the summit --- files/install/installCCS.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/files/install/installCCS.sh b/files/install/installCCS.sh index 474882c..1a6cc32 100755 --- a/files/install/installCCS.sh +++ b/files/install/installCCS.sh @@ -6,11 +6,12 @@ if [ $# -eq 0 ]; then exit 1 fi -ENVIRONMENT=$1 -NODE_NAME=$2 +TAG=$1 +ENVIRONMENT=$2 +NODE_NAME=$3 BASEDIR=$(dirname "$0") -DEV_PACKAGE_DIR="/lsst/ccsadm/dev-package-lists" +DEV_PACKAGE_DIR="/home/ccs/dev-package-lists" RELEASE_INSTALL_SCRIPT="/lsst/ccsadm/release/bin/install.py" CCS_INSTALL_DIR="/lsst/ccs/"$(date +%Y%m%d) @@ -28,13 +29,21 @@ then # Check that the dev-package-lists github project is up to date. # If not abort. + if [ ! -d $DEV_PACKAGE_DIR ]; then + git clone https://github.com/lsst-camera-dh/dev-package-lists.git $DEV_PACKAGE_DIR + fi cd $DEV_PACKAGE_DIR || exit + if ! git checkout "$TAG"; then + echo "Tag $TAG does not exist" + exit + fi + if ! gitPull=$(git pull); then echo "Something went wrong when updating $DEV_PACKAGE_DIR: $?: $gitPull" exit fi gitStatus=$(git status) - if [[ $gitStatus != *"nothing to commit, working directory clean"* ]]; then + if [[ $gitStatus != *"nothing to commit, working tree clean"* ]]; then echo Directory $DEV_PACKAGE_DIR is not up to date. Exiting. exit fi