mirror of
https://gitlab.com/Snogard/kaido.git
synced 2025-06-25 02:13:00 +02:00
added config command
This commit is contained in:
parent
82824fdc09
commit
fb1b383597
21
src/commands/config.sh
Normal file
21
src/commands/config.sh
Normal 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
|
Loading…
x
Reference in New Issue
Block a user