Formatting changes

This commit is contained in:
Jon-William Lewis
2016-02-10 23:33:43 -06:00
parent ef1469762b
commit be3871f859
2 changed files with 8 additions and 1 deletions

View File

@@ -0,0 +1,37 @@
function init_store {
if [ ! -r "$ROOT_DIR" ]; then mkdir -p "$ROOT_DIR"; WILL_INIT="TRUE"; fi
if [ ! -d "$TMP_DIR" ]; then mkdir -p "$TMP_DIR" ; WILL_INIT="TRUE"; fi
cat > "$CONFIG_FILE" << EOF
#==========================================================
# Simple Note System Config, v2.0a8
# Copyright 2014, Xenese Labs/Sicron-Perion XNF
#==========================================================
#File extension to use (for listing notes)
EXT=note
#Preferred Editor
if [ -z "$EDITOR" ]; then
EDITOR=vim
fi
#Encryption
#WARNING: ANY PREVIOUSLY UNENCRYPTED NOTES WILL BE LOST
#ENCRYPTION="TRUE"
ENCRYPTION="FALSE"
PUBKEY=""
EOF
chmod 600 "$CONFIG_FILE"
if [ "$WILL_INIT" == "TRUE" ]; then
printf "%s %s\n" "Environment initialized in" "$ROOT_DIR"
else
printf "%s\n" "Environment already initialized."
fi
}