diff options
Diffstat (limited to 'tcwg-llvm-common.sh')
-rwxr-xr-x | tcwg-llvm-common.sh | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tcwg-llvm-common.sh b/tcwg-llvm-common.sh index 180faa88..c7139b73 100755 --- a/tcwg-llvm-common.sh +++ b/tcwg-llvm-common.sh @@ -100,7 +100,7 @@ find_svn_rev() { # Find the largest revision of a list find_last_rev() { local LAST=0 - for rev in "$@"; do + for rev in $@; do [ "$rev" -gt "$LAST" ] && LAST=$rev done echo "$LAST" @@ -118,6 +118,18 @@ has_remote_branch() { fi } +# Find element in array +is_in_list() { + local ITEM="$1" + shift + for item in $@; do + if [ "$ITEM" = "$item" ]; then + return 0 + fi + done + return 1 +} + # Environment Variables and default values CPUS=$(nproc --all) # We may use between 500MB and 1GB per link job |