1
0
mirror of https://github.com/koalaman/shellcheck.git synced 2025-08-06 07:41:55 +08:00
Files
.github
doc
snap
src
test
.compile_binaries
.dockerignore
.ghci
.gitignore
.prepare_deploy
.snapsquid.conf
.travis.yml
CHANGELOG.md
Dockerfile
LICENSE
README.md
ShellCheck.cabal
manpage
nextnumber
quickrun
quicktest
shellcheck.1.md
shellcheck.hs
stack.yaml
striptests
shellcheck/nextnumber
Jon Higgs 7fb27310e1 Rely upon /usr/bin/env to find bash
This allows you to use the homebrew install Bash 4 on MacOS systems. It
should compatible with most if not all modern Linux distros.
2018-02-26 11:24:09 +11:00

14 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