From 9dddcb38f8be062ff1b0ab92f5a61fe4458dc978 Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Tue, 15 Jul 2025 09:02:38 +0100 Subject: add req.sh --- requirements/req.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 requirements/req.sh (limited to 'requirements/req.sh') 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 -- cgit v1.2.3