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
474 B
Bash
23 lines
474 B
Bash
#==========================================================================
|
|
# Subection: Print
|
|
#==========================================================================
|
|
if [ "$PRINT" == "TRUE" ]; then
|
|
if [ -r "$NOTE" -o -r ${NOTE%.*} ]; then
|
|
if [ -z "$CREATE" ]; then
|
|
if [ "$ENCRYPTION" == "TRUE" ]; then
|
|
openssl enc -d -aes-256-cbc -in ${NOTE%.*} -pass pass:$ENC_KEY
|
|
else
|
|
cat $NOTE
|
|
echo "" >> $NOTE
|
|
fi
|
|
else
|
|
|
|
echo ""
|
|
echo "ERROR: Note cannot be found."
|
|
echo ""
|
|
|
|
fi
|
|
fi
|
|
|
|
fi
|