diff options
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 |
