added config command

This commit is contained in:
Snogard 2023-07-22 15:16:14 +02:00
parent 82824fdc09
commit fb1b383597

21
src/commands/config.sh Normal file
View File

@ -0,0 +1,21 @@
#!/bin/bash
prefix=config
rootFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
scriptFolder=${rootFolder}/${prefix}
scriptName=$1
scriptPath=${scriptFolder}/${prefix}-${scriptName}.sh
if test -f "$scriptPath"; then
if [[ ! -x "$scriptPath" ]]; then
sudo chmod +x $scriptPath
fi
echo "Executing: $scriptPath $2 $3 $4 $5 $6 $7"
$scriptPath $2 $3 $4 $5 $6 $7
else
echo "Error file not found: ${scriptPath}"
fi