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:
Jon-William Lewis
2015-05-07 22:11:13 -05:00
parent 64e504ebcb
commit 3cb375f64b
22 changed files with 540 additions and 208 deletions

40
src/main/stage1.sns.sh Normal file
View File

@@ -0,0 +1,40 @@
#==============================================================================
# Section: Configuration
#==============================================================================
if [ -r $HOME/.sns/sns.conf ]; then
source $HOME/.sns/sns.conf
else
init_default_config
fi
if [ "$ENCRYPTION" == "TRUE" ]; then
if [ -z "$ENC_KEY" ]; then
ERR_NO_KEY="TRUE"
ENCRYPTION="FALSE"
fi
command -v openssl >/dev/null 2>&1 || { ERR_NO_SSL="TRUE"; ENCRYPTION="FALSE"; }
fi
if [ "$ENCRYPTION" == "TRUE" ]; then
PROD_STR="Simple Note System (Encryption Enabled)"
EXT="$EXT"
if [ ! -d ~/.sns/tmp ]; then
mkdir -p ~/.sns/tmp
fi
fi
echo "$PROD_STR, $VER_STR"
if [ -n "$ERR_NO_SSL" ]; then
echo >&2 " Warning: OpenSSL not installed. Encryption disabled."
fi
if [ -n "$ERR_NO_KEY" ]; then
echo " Warning: No encryption key was provided. Encryption disabled."
fi
if [ -n "$ERR_NO_SSL" -o -n "$ERR_NO_KEY" ]; then
pause
fi
#==============================================================================
# End Section: Configuration
#==============================================================================