Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Commit

Permalink
Bug 1106707 - Allow the variant to be mixed in with other params, r=coop
Browse files Browse the repository at this point in the history
  • Loading branch information
hotsphink committed Jan 22, 2015
1 parent cdbdd1c commit 70dfbbd
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions scripts/spidermonkey_builds/spidermonkey.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ DEFAULT_REPO="https://hg.mozilla.org/integration/mozilla-inbound"

function usage() {
echo "Usage: $0 [-m mirror_url] [-b bundle_url] [-r revision] [--dep] variant"
echo "PROPERTIES_FILE must be set for an automation build"
if [ -z "$PROPERTIES_FILE" ]; then
echo "PROPERTIES_FILE must be set for an automation build"
fi
}

# It doesn't work to just pull from try. If you try to pull the full repo,
Expand All @@ -20,7 +22,8 @@ function usage() {
# --bundle and/or --mirror.
hgtool_args=()
noclean=""
while [ $# -gt 1 ]; do
VARIANT=""
while [ $# -gt 0 ]; do
case "$1" in
-m|--mirror)
shift
Expand Down Expand Up @@ -55,14 +58,22 @@ while [ $# -gt 1 ]; do
shift
;;
*)
echo "Invalid arguments" >&2
usage
exit 1
if [ -z "$VARIANT" ]; then
VARIANT="$1"
shift
else
echo "Invalid arguments: multiple variants detected" >&2
usage
exit 1
fi
;;
esac
done

VARIANT="$1"
if [ -z "$VARIANT" ]; then
usage
exit 1
fi

if [ -n "$PROPERTIES_FILE" ]; then
if ! [ -f "$PROPERTIES_FILE" ]; then
Expand Down

0 comments on commit 70dfbbd

Please sign in to comment.