diff --git a/build.sh b/build.sh index d23b4e5..3a306e3 100755 --- a/build.sh +++ b/build.sh @@ -24,4 +24,5 @@ cat ./src/main/stage1.sns.sh >> "$S" cat ./src/main/stage2.sns.sh >> "$S" cat ./src/main/stage3.sns.sh >> "$S" +chmod u+x "$S" exit diff --git a/header.sh b/header.sh index 454afb9..9ffc69b 100644 --- a/header.sh +++ b/header.sh @@ -12,10 +12,13 @@ cat << EOF # Prevent freak accidents involving the root directory if [ -z "\$HOME" ]; then HOME=/home/"\$(whoami)"; fi -PROD_STR="$PROD_STR" +readonly PROD_STR="$PROD_STR" readonly VER_STR="$VER_STR" readonly ROOT_DIR="\$HOME"/.config/sns readonly NOTES_DIR="\$ROOT_DIR"/notes readonly TMP_DIR="\$ROOT_DIR"/tmp readonly CONFIG_FILE="\$ROOT_DIR/sns.conf" + +printf "%s\n" "\$PROD_STR" +printf "%s\n" "------------------" EOF diff --git a/src/includes/init_store.sns.sh b/src/includes/init_store.sns.sh index c58654b..40a4f0d 100644 --- a/src/includes/init_store.sns.sh +++ b/src/includes/init_store.sns.sh @@ -24,7 +24,7 @@ EOF chmod 600 "$CONFIG_FILE" -printf " - %s\n" "Rewrote Default Configuration" +printf "\n - %s\n" "Rewrote Default Configuration" if [ "$WILL_INIT" == "TRUE" ]; then printf " - %s %s\n" "Environment initialized in" "$ROOT_DIR" diff --git a/src/main/stage1.sns.sh b/src/main/stage1.sns.sh index b2ddef2..dc3e962 100644 --- a/src/main/stage1.sns.sh +++ b/src/main/stage1.sns.sh @@ -4,6 +4,7 @@ #============================================================================== # Stage 1: Read Configuration / Verify Integrity #============================================================================== + if [ -r "$CONFIG_FILE" ]; then source "$CONFIG_FILE" else @@ -24,14 +25,11 @@ fi if [ "$ENCRYPTION" == "TRUE" ]; then - PROD_STR="Simple Note System (Encryption Enabled)" if [ ! -d "$ROOT_DIR"/tmp ]; then mkdir -p "$ROOT_DIR"/tmp fi fi - echo "$PROD_STR, $VER_STR" - if [ -n "$ERR_NO_GPG" ]; then >&2 echo " Error: Encryption was specified, but GPG is not installed." exit 100