Alpha 3
Testing: Print function works
This commit is contained in:
@@ -1,22 +1,30 @@
|
||||
# Help requires no arguments, and is exclusive.
|
||||
if [ -n "$HELP" ]; then help; exit 0; fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# If no name or notebook is specified, the create, edit, and print functions will not function properly.
|
||||
# Check $NAME and $NOTEBOOK and exit if either are empty.
|
||||
if [ -z "$NAME" -o -z "$NOTEBOOK" ]; then;
|
||||
echo " ERROR: Insufficient arguments";
|
||||
help; #Remind the user how to use the script
|
||||
exit 10;
|
||||
# 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.tmp
|
||||
fi
|
||||
if [ "$ENCRYPTION" == "TRUE" ]; then NOTE=$NOTE.tmp fi
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user