1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30:
#!/bin/bash VERSION=27.5.65 for server in xldn0323bap xldn0322pap do echo "Server: $server" echo "Deleting old data... from /sbclocal/apps/ske/SKERelease-Temp/" ssh $server 'rm -rf /sbclocal/apps/ske/SKERelease-Temp/*' echo "Copying build..." scp xldn1515vdap:/sbclocal/etdet/teamcity/published-builds/${VERSION}/Build/tars/SKE_Installer-${VERSION}.tar $server:/sbclocal/apps/ske/SKERelease-Temp/ if [ "${server:8:1}" = "b" ] then DEPLOYS="WASDeploy CLPDeploy" SUFFIX="DR" else DEPLOYS="DBDeploy WASDeploy CLPDeploy" unset SUFFIX fi for deploy in $DEPLOYS do echo "Untaring ${deploy}..." DIRNAME="/sbclocal/apps/ske/SKERelease-Temp/${deploy}${SUFFIX}" echo "Making DIRNAME $DIRNAME" ssh $server mkdir $DIRNAME ssh $server tar -xvf /sbclocal/apps/ske/SKERelease-Temp/SKE_Installer-${VERSION}.tar -C $DIRNAME done done