author Robert O'Callahan <>
Thu, 18 Sep 2014 17:13:14 +1200
changeset 216603 098a4f0cd0ae3aa30bb0c3bed4a04c1d1ceca129
parent 94475 f4157e8c410708d76703f19e4dfb61859bfe32d8
permissions -rwxr-xr-x
Bug 1061046. Part 14: Remove TimeToTicksRoundDown. r=karlt

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at
# 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 variables if set:
# SYMBOL_SERVER_SSH_KEY : path to a ssh private key to use
# SYMBOL_SERVER_PORT    : port to use for ssh
# POST_SYMBOL_UPLOAD_CMD: a commandline to run on the remote host after
#                         uploading. The full path of the symbol index
#                         file will be appended to the commandline.
# The script expects two command-line arguments, in this order:
#   - The symbol index name
#   - The symbol archive

set -e

: ${SYMBOL_SERVER_HOST?} ${SYMBOL_SERVER_USER?} ${SYMBOL_SERVER_PATH?} ${1?"You must specify a symbol index name."} ${2?"You must specify a symbol archive to upload"}


hash=`openssl dgst -sha1 "${SYMBOL_ARCHIVE}" | sed 's/^.*)=//' | sed 's/\ //g'`
archive="${hash}-"`basename "${SYMBOL_ARCHIVE}" | sed 's/\ //g'`
echo "Transferring symbols... ${SYMBOL_ARCHIVE}"
echo "Unpacking symbols on remote host..."
  "set -e;
   umask 0022;
   unzip -n '$archive';
   rm -v '$archive';"
if test -n "$POST_SYMBOL_UPLOAD_CMD"; then
echo "Symbol transfer completed"