Changes: Split script into several different files for easier editting Added build.sh to compile Simple Note System from tree Changed config file to config folder; $HOME/.sns now contains configuration and notes Testing: Script runs and produces help screen; no further testing done.
23 lines
442 B
Bash
23 lines
442 B
Bash
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 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;
|
|
fi
|
|
|
|
|
|
NOTEDIR=$BASEDIR/$NOTEBOOK/$SECTION/
|
|
NOTE=$NOTEDIR$NAME.$EXT
|
|
|
|
if [ "$ENCRYPTION" == "TRUE" ]; then
|
|
NOTE=$NOTE.tmp
|
|
fi
|