Files
vns/init/stage1.sns.sh
Jon-William Lewis 64e504ebcb v2.0a3 -> v2.0a4
Rearranged tree to be more sane.
Made formatting changes to stage 2.
Fixed a bug where edit would be bypassed if the note was just created.
2015-05-07 21:23:12 -05:00

41 lines
1.1 KiB
Bash

#==============================================================================
# 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
#==============================================================================