diff options
| author | Joe Carstairs <me@joeac.net> | 2025-07-15 09:02:38 +0100 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2025-07-15 09:02:38 +0100 |
| commit | 9dddcb38f8be062ff1b0ab92f5a61fe4458dc978 (patch) | |
| tree | 9d63bf42386b8bea37d5215418b41cffc77f0f5d /requirements | |
| parent | 3e28cfadcf5d287a9d68539d9549f011744dfeae (diff) | |
add req.sh
Diffstat (limited to 'requirements')
| -rwxr-xr-x | requirements/req.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/requirements/req.sh b/requirements/req.sh new file mode 100755 index 0000000..335c322 --- /dev/null +++ b/requirements/req.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +command="$1" +script="$(dirname $0)/scripts/req-${command}" +if [ -x "$script" ] +then + shift 1 + $script $@ + exit 0 +fi + +if [ -f "$script" ] +then + echo "$script is not executable. Try chmod +x $script and try again." + exit 1 +fi + +if [ -a "$script" ] +then + echo "$script is not a regular file. Try replacing $script with an executable and try again." + exit 1 +fi + +echo "$script does not exist." +exit 1 |
