#!/bin/bash commandName=$1 rootFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" scriptPath=${rootFolder}/src/commands/${commandName}.sh if test -f "$scriptPath"; then if [[ ! -x "$scriptPath" ]]; then sudo chmod +x $scriptPath fi #TODO: make parameters dynamic $@ echo "Executing: $scriptPath" $scriptPath $2 $3 $4 $5 $6 $7 $8 $9 else echo "Error file not found: ${scriptPath}" fi