mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-06 13:01:39 -07:00
This allows you to use the homebrew install Bash 4 on MacOS systems. It should compatible with most if not all modern Linux distros.
13 lines
320 B
Bash
Executable file
13 lines
320 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# TODO: Find a less trashy way to get the next available error code
|
|
if ! shopt -s globstar
|
|
then
|
|
echo "Error: This script depends on Bash 4." >&2
|
|
exit 1
|
|
fi
|
|
|
|
for i in 1 2
|
|
do
|
|
last=$(grep -hv "^prop" ./**/*.hs | grep -Ewo "$i[0-9]{3}" | sort -n | tail -n 1)
|
|
echo "Next ${i}xxx: $((last+1))"
|
|
done
|