Fix generate-excludelist.sh for Bash 4.1

Bash 4.1 does not support a -1 array subscript. Compute the last index instead.
This commit is contained in:
Alexander Gottwald
2018-04-27 10:05:05 +02:00
committed by GitHub
parent 9c90a882ac
commit 8a17fbf310
+1 -1
View File
@@ -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"