scripts/tooltool/tooltool_wrapper.sh
author ffxbld
Tue, 21 Oct 2014 19:57:19 -0700
changeset 5082 327616201e98fe261d4c19f1eeb86be3ed3a6ad4
parent 4675 bb2e379769db94d9770d99391703275b3375b06e
permissions -rwxr-xr-x
Added tag FIREFOX_33_0_1_RELEASE_RUNTIME, FIREFOX_33_0_1_BUILD1_RUNTIME for changeset 3a47f5e325a5

#!/bin/sh

set -e

TT_MANIFEST=$1
TT_BASEURL=$2
TT_BOOTSTRAP=$3
TT_CMD=$4

# shift so "$@" is now TT_CMD and all extra parameters
shift 3

if [ -e "$TT_MANIFEST" ]; then

    if [ ! -x "$TT_CMD" ] && ! which "$TT_CMD" >/dev/null 2>&1; then
        echo "Cannot execute $TT_CMD, exiting"
        exit 1
    fi

    echo "$TT_MANIFEST content"
    echo "======================================================="
    cat "$TT_MANIFEST"
    echo "======================================================="
    echo "Fetching..."
    python $(cd $(dirname $0) && pwd)/../../buildfarm/utils/retry.py -- \
      "$@" --url "$TT_BASEURL" --overwrite -m "$TT_MANIFEST" fetch ${TOOLTOOL_CACHE:+ -c ${TOOLTOOL_CACHE}}
    if [ -e "$TT_BOOTSTRAP" ]; then
        echo "Bootstraping..."
        bash -xe "$TT_BOOTSTRAP"
    fi
else
    echo "$TT_MANIFEST doesn't exist, skipping..."
fi