From d3b7a4a04e6dbff6c6b37946c2a64fd2cae4056f Mon Sep 17 00:00:00 2001 From: Nate Foss Date: Sat, 29 Feb 2020 17:10:47 -0500 Subject: [PATCH] add some comments --- deploy.sh | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/deploy.sh b/deploy.sh index cf705bc0..2568e94b 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,13 +1,17 @@ +# To run this script you must have *in your athena locker*: +# - 'aklog' written in ~/.bash_environment (or the environment file for whatever shell you use) +# - 'sipb' and 'athena' written in ~/.xlog. +# Otherwise, you will not have permission to access the courseroad locker, +# even if you are on courseroad-dev@. + +#syntax: ./deploy.sh [dev|prod] [kerberos] + +# this section is for Miriam's kdo setup if [ $SHELL = "/bin/zsh" ]; then source ~/.zshrc fi -# To run this script you must have 'aklog' written in ~/.bash_environment -# (or the environment file for whatever shell you use) -# and 'sipb' and 'athena' written in ~/.xlog (both of these files should be in your athena locker). -# Otherwise, you will not have permission to access the courseroad locker, -# even if you are on courseroad-dev. -#syntax: ./deploy.sh [dev or prod] [kerberos] +# exit if anything errors set -e npm run build-$1 @@ -19,15 +23,16 @@ if [ "$1" = "prod" ]; then if which aklog &>/dev/null; then echo "AFS detected, using AFS for deployment" if which kdo &>/dev/null; then - echo "Using kdo" + echo "Using kdo" kdo $2 aklog sipb else - kinit -f -l 1h $2 - aklog sipb + kinit -f -l 1h $2 + aklog sipb fi rsync --delete --progress --checksum -r deploy/production/.htaccess dist/* /afs/sipb.mit.edu/project/courseroad/web_scripts/courseroad/ else echo "Could not locate AFS, using SSH for deployment" + # this is what happens without any fancy setup scp -r deploy/production/.htaccess dist/* $2@athena.dialup.mit.edu:/mit/courseroad/web_scripts/courseroad/ fi else @@ -47,6 +52,7 @@ elif [ "$1" = "dev" ]; then rsync --delete --progress --checksum -r deploy/development/.htaccess dist/* /afs/sipb.mit.edu/project/courseroad/web_scripts/courseroad/dev/ else echo "Could not locate AFS, using SSH for deployment" + # this is what happens without any fancy setup scp -r deploy/development/.htaccess dist/* $2@athena.dialup.mit.edu:/mit/courseroad/web_scripts/courseroad/dev/ fi else