2.0a4 -> 2.0a5
Changed some filenames Rewrote edit function to be more sane Separated encryption and decryption functions from edit into libencryption.sh Fixed a bug where an edit tag would be added regardless of create status
This commit is contained in:
30
src/main/stage3.sns.sh
Normal file
30
src/main/stage3.sns.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user