From 4335ab93c95ca94532ed9c7d56cefdc55659390c Mon Sep 17 00:00:00 2001 From: Francesco Abbate Date: Tue, 16 Feb 2021 16:31:46 +0100 Subject: [PATCH] Require a branch in build-package script --- build-packages.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build-packages.sh b/build-packages.sh index b7cccfa6..0ef23761 100755 --- a/build-packages.sh +++ b/build-packages.sh @@ -10,7 +10,7 @@ copy_directory_from_repo () { fi local dirname="$1" local destdir="$2" - git archive master "$dirname" --format=tar | tar xf - -C "$destdir" "${tar_options[@]}" + git archive "$use_branch" "$dirname" --format=tar | tar xf - -C "$destdir" "${tar_options[@]}" } # Check if build directory is ok to be used to build. @@ -190,6 +190,10 @@ while [ ! -z {$1+x} ]; do portable=true shift ;; + -branch=*) + use_branch="${1#-branch=}" + shift + ;; *) version="$1" arch="$2" @@ -197,6 +201,11 @@ while [ ! -z {$1+x} ]; do esac done +if [ -z ${use_branch+set} ]; then + echo "Please specify a branch with -branch=" + exit 1 +fi + build_dir=".build-$arch" if [ -z ${pgo+set} ]; then