Bug 392244 - "Allow alternate ssh port in upload_symbols.sh". r=luser, a=bzbarsky.
authorbent.mozilla@gmail.com
Tue, 28 Aug 2007 16:48:09 -0700
changeset 5403 b25941106951afce9e46cd7cb7e128136b8d4e90
parent 5402 80131b88a3cc34269594073092d8e5ca15bca062
child 5404 16ca15823aa3d4a3c2842c452088ae2e2ff51bc6
push idunknown
push userunknown
push dateunknown
reviewersluser, bzbarsky
bugs392244
milestone1.9a8pre
Bug 392244 - "Allow alternate ssh port in upload_symbols.sh". r=luser, a=bzbarsky.
toolkit/crashreporter/tools/upload_symbols.sh
--- a/toolkit/crashreporter/tools/upload_symbols.sh
+++ b/toolkit/crashreporter/tools/upload_symbols.sh
@@ -36,27 +36,30 @@
 #
 # ***** END LICENSE BLOCK *****
 #
 # This script expects the following environment variables to be set:
 # SYMBOL_SERVER_HOST    : host to upload symbols to
 # SYMBOL_SERVER_USER    : username on that host
 # SYMBOL_SERVER_PATH    : path on that host to put symbols in
 #
-# And will use the following optional environment variable if set:
+# And will use the following optional environment variables if set:
 # SYMBOL_SERVER_SSH_KEY : path to a ssh private key to use
+# SYMBOL_SERVER_PORT    : port to use for ssh
 #
 set -e
 
 : ${SYMBOL_SERVER_HOST?} ${SYMBOL_SERVER_USER?} ${SYMBOL_SERVER_PATH?} ${1?"You must specify a symbol archive to upload"}
 archive=`basename $1`
 echo "Transferring symbols... $1"
-scp -v ${SYMBOL_SERVER_SSH_KEY:+-i "$SYMBOL_SERVER_SSH_KEY"} $1 \
+scp -v ${SYMBOL_SERVER_PORT:+-P $SYMBOL_SERVER_PORT} \
+  ${SYMBOL_SERVER_SSH_KEY:+-i "$SYMBOL_SERVER_SSH_KEY"} $1 \
   ${SYMBOL_SERVER_USER}@${SYMBOL_SERVER_HOST}:${SYMBOL_SERVER_PATH}/
 echo "Unpacking symbols on remote host..."
-ssh -2 ${SYMBOL_SERVER_SSH_KEY:+-i "$SYMBOL_SERVER_SSH_KEY"} \
+ssh -2 ${SYMBOL_SERVER_PORT:+-p $SYMBOL_SERVER_PORT} \
+  ${SYMBOL_SERVER_SSH_KEY:+-i "$SYMBOL_SERVER_SSH_KEY"} \
   -l ${SYMBOL_SERVER_USER} ${SYMBOL_SERVER_HOST} \
   "set -e;
    umask 0022;
    cd ${SYMBOL_SERVER_PATH};
    unzip -o $archive;
    rm -v $archive;"
 echo "Symbol transfer completed"