mirror of
https://gitlab.com/Snogard/kaido.git
synced 2025-06-25 02:13:00 +02:00
19 lines
441 B
Bash
Executable File
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 |