Corrected issues arising from "$BASE_DIR" vs "$ROOT_DIR"

This commit is contained in:
Jon-William Lewis
2016-01-25 23:41:41 -06:00
parent 238934c979
commit 77c3398c5f
8 changed files with 39 additions and 41 deletions

View File

@@ -7,14 +7,14 @@ fi
if [ "$ENCRYPTION" == "TRUE" ]; then
cp "$NOTE" "$NOTE".bk
if [ ! -d "$ROOT_DIR"/tmp ]; then mkdir "$ROOT_DIR"/tmp; fi
TARGET="$TMP_DIR/$SESSION_ID"
decrypt > "$TARGET"
else TARGET="$NOTE"; fi
TMP_NOTE="$TMP_DIR/$SESSION_ID"
decrypt > "$TMP_NOTE"
else TMP_NOTE="$NOTE"; fi
if [ -z "$CREATE" ]; then printf "\nEDIT %s" "$(date)" >> "$TARGET"; fi
if [ -z "$CREATE" ]; then printf "\nEDIT %s" "$(date)" >> "$TMP_NOTE"; fi
"$EDITOR" "$TARGET"
"$EDITOR" "$TMP_NOTE"
if [ "$ENCRYPTION" == "TRUE" ]; then
rm "$NOTE"