From f997ad163f507d5b4fdb03a8846d489969edc132 Mon Sep 17 00:00:00 2001 From: Toine Date: Fri, 21 Jun 2024 12:56:42 -0500 Subject: [PATCH] Fix update script --- bin/pypi_update.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/bin/pypi_update.sh b/bin/pypi_update.sh index e69de29bb2..8a7e2cf1b5 100644 --- a/bin/pypi_update.sh +++ b/bin/pypi_update.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +BASE_DIR=/data/tier0 +cd $BASE_DIR + +echo "Removing old scripts" +sleep 1 +rm $BASE_DIR/00_pypi_*.sh +sleep 1 + +declare -A PYPI_DEPLOYMENT_SCRIPTS=( + [00_pypi_start_agent.sh]=https://raw.githubusercontent.com/dmwm/T0/master/bin/00_pypi_start_agent.sh + [00_pypi_stop_agent.sh]=https://raw.githubusercontent.com/dmwm/T0/master/bin/00_pypi_stop_agent.sh + [00_pypi_reset_couch.sh]=https://raw.githubusercontent.com/dmwm/T0/master/bin/00_pypi_reset_couch.sh + [00_pypi_resource_control.sh]=https://raw.githubusercontent.com/dmwm/T0/master/bin/00_pypi_resource_control.sh + [00_pypi_patches.sh]=https://raw.githubusercontent.com/dmwm/T0/master/bin/00_pypi_patches.sh + [00_pypi_deploy_replay.sh]=https://raw.githubusercontent.com/dmwm/T0/master/bin/00_pypi_deploy_replay.sh + [00_pypi_deploy_prod.sh]=https://raw.githubusercontent.com/dmwm/T0/master/bin/00_pypi_deploy_prod.sh +) + +for SCRIPT in "${!PYPI_DEPLOYMENT_SCRIPTS[@]}"; do + echo "Now updating $SCRIPT" + sleep 1 + wget ${PYPI_DEPLOYMENT_SCRIPTS[$SCRIPT]} -O $BASE_DIR/$SCRIPT + chmod +x $BASE_DIR/$SCRIPT +done +