Files
vns/init/stage3.sns.sh
Jon-William Lewis 64e504ebcb v2.0a3 -> v2.0a4
Rearranged tree to be more sane.
Made formatting changes to stage 2.
Fixed a bug where edit would be bypassed if the note was just created.
2015-05-07 21:23:12 -05:00

31 lines
770 B
Bash

# Help requires no arguments, and is exclusive.
if [ -n "$HELP" ]; then help; exit 0; fi
# 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
NOTEDIR=$BASEDIR/$NOTEBOOK/$SECTION/
NOTE=$NOTEDIR$NAME.$EXT
if [ "$ENCRYPTION" == "TRUE" ]; then NOTE=$NOTE.enc; fi
if [ "$PRINT" == "TRUE" ]; then print; exit 0; fi
if [ "$CREATE" == "TRUE" ]; then create; fi
if [ "$EDIT" == "TRUE" ]; then edit; fi