Debian Codegraph @

contrib/trigger_deploy.sh

raw symbols SCIP
1 #!/bin/bash
2 # Triggers deploy.sh to maybe update the website or move binaries.
3 # uploadserver needs to be defined in /etc/hosts
4
5 SSHUSER=$1
6 TRIGGERVERSION=$2
7 if [ -z "$SSHUSER" ] || [ -z "$TRIGGERVERSION" ]; then
8 echo "usage: $0 SSHUSER TRIGGERVERSION"
9 echo "e.g. $0 thomasv 3.0.0"
10 echo "e.g. $0 thomasv website"
11 exit 1
12 fi
13 set -ex
14 cd "$(dirname "$0")"
15
16 if [ "$TRIGGERVERSION" == "website" ]; then
17 rm -f trigger_website
18 touch trigger_website
19 echo "uploading file: trigger_website..."
20 sftp -oBatchMode=no -b - "$SSHUSER@uploadserver" << !
21 cd electrum-downloads-airlock
22 mput trigger_website
23 bye
24 !
25 else
26 rm -f trigger_binaries
27 printf "$TRIGGERVERSION" > trigger_binaries
28 echo "uploading file: trigger_binaries..."
29 sftp -oBatchMode=no -b - "$SSHUSER@uploadserver" << !
30 cd electrum-downloads-airlock
31 mput trigger_binaries
32 bye
33 !
34 fi
35