Formatting changes

This commit is contained in:
Jon-William Lewis
2016-02-10 23:34:49 -06:00
parent be3871f859
commit 856b14242c
14 changed files with 267 additions and 282 deletions

View File

@@ -1,39 +1,37 @@
#==============================================================================
# Section: Actions / Stage 3
#==============================================================================
# List only requires a notebook, and is exclusive.
if [ -z "$NOTEBOOK" ]; then
echo " ERROR: Insufficient arguments:"
echo " Notebook not specified"
exit 30
fi
if [ -n "$LIST" ]; then
list
exit 0
fi
#All other functions require a note title and notebook.
if [ -z "$NAME" ]; then
echo " ERROR: Insufficient arguments:"
echo " Title not specified"
exit 30
fi
SESSION_ID="$RANDOM"
NOTE_DIR="$NOTES_DIR"/"$NOTEBOOK"/"$SECTION"/
#==============================================================================
# Section: Actions / Stage 3
#==============================================================================
# All options not requiring at least a notebook to be specified have been dealt
# with; if one isn't specified, throw code 30.
if [ -z "$NOTEBOOK" ]; then
printf "\n%s\n %s\n" "ERROR: Insufficient arguments:" "Notebook not specified"
exit 30
fi
# List is the only option requiring only a notebook.
# If list isn't the selected option and no note name was specified, throw code 30.
if [ "$LIST" == TRUE ]; then
list
exit 0
elif [ -z "$NAME" ];
printf "\n%s\n %s\n" "ERROR: Insufficient arguments:" "Notebook not specified"
exit 30
fi
NOTE_DIR="$NOTES_DIR"/"$NOTEBOOK"/"$SECTION"
if [ "$ENCRYPTION" == "TRUE" ]; then readonly NOTE="$NOTE_DIR""$NAME"."$EXT".gpg
else readonly NOTE="$NOTE_DIR""$NAME"."$EXT"
fi
if [ "$ENCRYPTION" == "TRUE" ]; then
SESSION_ID="$RANDOM" #SESSION_ID later becomes the temporary filename
readonly NOTE="$NOTE_DIR/$NAME.$EXT.gpg"
else
readonly NOTE="$NOTE_DIR/$NAME.$EXT"
fi
if [ "$PRINT" == "TRUE" ]; then print; exit 0; fi
if [ "$DELETE" == "TRUE" ]; then delete; exit 0; fi
if [ "$CREATE" == "TRUE" ]; then create; fi
if [ "$EDIT" == "TRUE" ]; then edit; fi
if [ "$PRINT" == "TRUE" ]; then print; exit 0; fi
if [ "$DELETE" == "TRUE" ]; then delete; exit 0; fi
if [ "$CREATE" == "TRUE" ]; then create; fi
if [ "$EDIT" == "TRUE" ]; then edit; fi
#==============================================================================
# End Section: Actions / Stage 3
#==============================================================================
#==============================================================================
# End Section: Actions / Stage 3
#==============================================================================