kaido/kaido.sh
2023-07-06 14:17:44 +02:00

19 lines
441 B
Bash
Executable File

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