File: thumbspage/build/x-publish-external-demos-prod/common.sh

#-------------------------------------------------------------------------
# Common code, sourced by all client folders' _publish.sh:
# source ~/MY-STUFF/Websites/_admin/BUILD-THUMBSPAGE-CLIENTS/common.sh
#-------------------------------------------------------------------------

shopt -s expand_aliases    # for py3 if noninteractive
alias py3=python3

Z=~/MY-STUFF/Code/ziptools/link
W=~/MY-STUFF/Websites
C=~/MY-STUFF/Code
M=$C/thumbspage/build

stamp=$(date +%b-%d-%y)

# ensure scratch folder
temp=~/Desktop/temp
if [ ! -d $temp ]; then { rm -rf $temp; mkdir $temp; } fi

# uploads and remote unzips
sshusr=bitnami@44.232.137.139
sshkey=$W/_admin/SSH-private-key-download/LightsailDefaultKey-us-west-2.pem

function SCP { scp -i $sshkey $1 $sshusr:$2; }    # pass from, to
function SSH { ssh -i $sshkey $sshusr; }          # pass here doc of cmds
 
# or: SSH="ssh -i $sshkey $sshusr" + $SSH (use "" to eval nested vars)



[Home page] Books Code Blog Python Author Train Find ©M.Lutz