#!/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