bug 376046 - add support for specifying an ssh private key in the symbol upload script - bash-fu + a bonus fix that i missed in a previous patch. r=bsmedberg
authorted.mielczarek@gmail.com
Tue, 24 Jul 2007 18:06:13 -0700
changeset 3925 9484e76608668ce92802041554e53dbc9bdc042e
parent 3924 b787ea4db38acc9b46b10315b89f8b285c6ba997
child 3926 53ca657ec47820cdd78d17970d661f9aa1ba6013
push idunknown
push userunknown
push dateunknown
reviewersbsmedberg
bugs376046
milestone1.9a7pre
bug 376046 - add support for specifying an ssh private key in the symbol upload script - bash-fu + a bonus fix that i missed in a previous patch. r=bsmedberg
toolkit/crashreporter/tools/upload_symbols.sh
--- a/toolkit/crashreporter/tools/upload_symbols.sh
+++ b/toolkit/crashreporter/tools/upload_symbols.sh
@@ -1,9 +1,9 @@
-#!/bin/sh
+#!/bin/bash
 #
 # ***** BEGIN LICENSE BLOCK *****
 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
 #
 # The contents of this file are subject to the Mozilla Public License Version
 # 1.1 (the "License"); you may not use this file except in compliance with
 # the License. You may obtain a copy of the License at
 # http://www.mozilla.org/MPL/
@@ -44,18 +44,18 @@
 # And will use the following optional environment variable if set:
 # SYMBOL_SERVER_SSH_KEY : path to a ssh private key to use
 #
 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_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_SSH_KEY:+-i $SYMBOL_SERVER_SSH_KEY} \
   -l ${SYMBOL_SERVER_USER} ${SYMBOL_SERVER_HOST} \
   "set -e;
    cd ${SYMBOL_SERVER_PATH};
    unzip $archive;
    rm -v $archive;"
 echo "Symbol transfer completed"