Alpha 3
Testing: Print function works
This commit is contained in:
@@ -8,7 +8,7 @@ SECTION=""
|
||||
|
||||
if [ -z "$1" ]; then #If no input was given, print help
|
||||
help
|
||||
exit
|
||||
exit 20
|
||||
else #Assume the user wants to do something.
|
||||
ARGS=( "$@" )
|
||||
for ARG in ${ARGS[@]};do
|
||||
@@ -23,18 +23,22 @@ else #Assume the user wants to do something.
|
||||
else
|
||||
if [ -z "$NAME" -a -n $ARG ]; then
|
||||
NAME=$ARG
|
||||
echo "Name: $NAME"
|
||||
elif [ -z "$NOTEBOOK" -a -n $ARG ]; then
|
||||
NOTEBOOK=$ARG
|
||||
echo "Notebook: $NOTEBOOK"
|
||||
elif [ -z "$SECTION" -a -n $ARG ]; then
|
||||
SECTION=$ARG
|
||||
echo "Section: $SECTION"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ -n "$NAME" -a -z "$NOTEBOOK" ]; then
|
||||
NOTEBOOK="$NAME"
|
||||
NAME=""
|
||||
fi
|
||||
fi
|
||||
|
||||
# Note: writeconf has highest priority, and it is the only function that can
|
||||
# work without any parameters.
|
||||
|
||||
#==============================================================================
|
||||
# End Section: Argument Parsing
|
||||
#==============================================================================
|
||||
|
||||
Reference in New Issue
Block a user