Progress. I can now create and edit notes reliably.
This commit is contained in:
@@ -14,13 +14,12 @@ if [ "$ENCRYPTION" == "TRUE" ]; then
|
||||
ENCRYPTION="FALSE"
|
||||
fi
|
||||
|
||||
command -v openssl >/dev/null 2>&1 ||\
|
||||
{ ERR_NO_SSL="TRUE"; ENCRYPTION="FALSE"; }
|
||||
command -v gpg >/dev/null 2>&1 ||\
|
||||
{ ERR_NO_GPG="TRUE"; ENCRYPTION="FALSE"; }
|
||||
fi
|
||||
|
||||
if [ "$ENCRYPTION" == "TRUE" ]; then
|
||||
PROD_STR="Simple Note System (Encryption Enabled)"
|
||||
EXT="$EXT".gpg
|
||||
if [ ! -d "$BASE_DIR"/tmp ]; then
|
||||
mkdir -p "$BASE_DIR"/tmp
|
||||
fi
|
||||
@@ -28,16 +27,17 @@ 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."
|
||||
if [ -z "$EDITOR" ]; then
|
||||
>&2 echo "Error no editor specified in environment."
|
||||
|
||||
elif [ -n "$ERR_NO_GPG" ]; then
|
||||
>&2 echo " Error: Encryption was specified, but GPG is not installed."
|
||||
exit 100
|
||||
elif [ -n "$ERR_NO_KEY" ]; then
|
||||
>&2 echo " Error: No GPG recipient was provided in $CONFIG_FILE. "
|
||||
exit 110
|
||||
fi
|
||||
|
||||
if [ -n "$ERR_NO_SSL" ] || [ -n "$ERR_NO_KEY" ]; then
|
||||
pause
|
||||
fi
|
||||
|
||||
#==============================================================================
|
||||
# End Section: Configuration / Stage 1
|
||||
|
||||
Reference in New Issue
Block a user