1
1
Fork 0
mirror of https://github.com/tonydamage/nux-env.git synced 2025-12-11 13:24:28 +01:00

Added nux-runner script to provide common functionality

This commit is contained in:
Tony Tkáčik 2016-11-10 15:21:05 +01:00
parent 4782e60876
commit bd4c42d40d

26
bin/nux-runner Executable file
View file

@ -0,0 +1,26 @@
#!/bin/bash
##
## help - Shows this help
##
task_help() {
SCRIPTNAME=$(basename $NUX_SCRIPT)
echo Usage $SCRIPTNAME [task] [options]
grep "^\#\#\#" $NUX_SCRIPT | cut -d\# -f4-
grep "^\#\# " $NUX_SCRIPT | cut -d\# -f3-
echo
echo " help - Shows this help"
echo
}
task_() {
task_help
}
NUX_SCRIPT=$1; shift; # Determines script
TASK=$1; shift; # Determines task
source $NUX_SCRIPT; # Includes script
task_$task "$*" # Runs task