Browse Source

Fix generate-excludelist.sh for Bash 4.1

Bash 4.1 does not support a -1 array subscript. Compute the last index instead.
master
Alexander Gottwald 7 years ago
committed by GitHub
parent
commit
8a17fbf310
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      tools/generate-excludelist.sh

2
tools/generate-excludelist.sh

@ -37,6 +37,6 @@ EOF
for item in ${blacklisted[@]:0:${#blacklisted[@]}-1}; do
echo -e ' "'"$item"'",' >> "$filename"
done
echo -e ' "'"${blacklisted[-1]}"'"' >> "$filename"
echo -e ' "'"${blacklisted[$((${#blacklisted[@]}-1))]}"'"' >> "$filename"
echo "};" >> "$filename"

Loading…
Cancel
Save