Allow install-server to install according to a branch other than master

(imported from commit 28c643593540f6a679bf32677dfff8946e777554)
This commit is contained in:
Zev Benjamin 2013-11-25 14:37:37 -05:00 committed by Tim Abbott
parent 9a2bf4f359
commit 6ea795915e
1 changed files with 8 additions and 3 deletions

View File

@ -3,16 +3,21 @@
server=$1
type=$2
hostname=$3
branch=$4
if [ -z "$hostname" ]; then
echo "USAGE: $0 server type hostname"
echo "USAGE: $0 server type hostname [branch]"
exit 1
fi
if ! $(echo "$hostname" | grep -q zulip); then
echo "USAGE: $0 server type hostname"
echo "USAGE: $0 server type hostname [branch]"
echo "Hostname must have zulip in it."
exit 1
fi
if [ -z "$branch" ]; then
branch=master
fi
zulip_root=${ZULIP_ROOT:-$HOME/zulip}
amazon_key_file=$zulip_root/zulip.pem
@ -75,7 +80,7 @@ cd /root
rm -rf /root/zulip
git clone git@git.zulip.net:eng/zulip.git
cd /root/zulip
git checkout master
git checkout $branch
EOF
ssh $SSH_OPTS "$server" -t -i "$amazon_key_file" -lroot <<EOF