Skip to content

Commit

Permalink
Add more comments to shell script
Browse files Browse the repository at this point in the history
  • Loading branch information
dgreensp committed Sep 3, 2015
1 parent 9952552 commit 978f710
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/admin/publish-meteor-tool-on-arch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,12 @@ END
# delete existing batch script if it exists
ssh $USERNAME@$HOST -oUserKnownHostsFile="$TEMP_KEY" -p "$PORT" -i "$TEMP_PRIV_KEY" "cmd /c del C:\\publish-tool.bat || exit 0" 2>/dev/null

# copy batch script to windows machine
# copy batch script to windows machine, in a funky way, by splicing each
# line of publish-meteor-tool.bat into a Windows `echo` command, with no
# escaping.
# therefore, the lines of publish-meteor-tool.bat must already be
# escaped, for example `>` as `^>` and `%` as `^%`.

BAT_FILENAME="$ADMIN_DIR/publish-meteor-tool.bat"

# we need to use file descriptor 10 because otherwise SSH will conflict with
Expand All @@ -105,6 +110,8 @@ END
}

# get keys from "meteor admin get-machine" command
# inputs: SESSION_FILE, METEOR, PLATFORM, CHECKOUT_DIR
# outputs: USERNAME, HOST, PORT, TEMP_KEY, TEMP_PRIV_KEY
parse_keys () {
trap 'echo "${red}Failed to parse the machine credentials${NC}";clean_up' EXIT
CREDS=$(METEOR_SESSION_FILE="$SESSION_FILE" "$METEOR" admin get-machine $PLATFORM --json)
Expand Down

0 comments on commit 978f710

Please sign in to comment.