Formatting changes
This commit is contained in:
1
build.sh
1
build.sh
@@ -24,4 +24,5 @@ cat ./src/main/stage1.sns.sh >> "$S"
|
|||||||
cat ./src/main/stage2.sns.sh >> "$S"
|
cat ./src/main/stage2.sns.sh >> "$S"
|
||||||
cat ./src/main/stage3.sns.sh >> "$S"
|
cat ./src/main/stage3.sns.sh >> "$S"
|
||||||
|
|
||||||
|
chmod u+x "$S"
|
||||||
exit
|
exit
|
||||||
|
|||||||
@@ -12,10 +12,13 @@ cat << EOF
|
|||||||
# Prevent freak accidents involving the root directory
|
# Prevent freak accidents involving the root directory
|
||||||
if [ -z "\$HOME" ]; then HOME=/home/"\$(whoami)"; fi
|
if [ -z "\$HOME" ]; then HOME=/home/"\$(whoami)"; fi
|
||||||
|
|
||||||
PROD_STR="$PROD_STR"
|
readonly PROD_STR="$PROD_STR"
|
||||||
readonly VER_STR="$VER_STR"
|
readonly VER_STR="$VER_STR"
|
||||||
readonly ROOT_DIR="\$HOME"/.config/sns
|
readonly ROOT_DIR="\$HOME"/.config/sns
|
||||||
readonly NOTES_DIR="\$ROOT_DIR"/notes
|
readonly NOTES_DIR="\$ROOT_DIR"/notes
|
||||||
readonly TMP_DIR="\$ROOT_DIR"/tmp
|
readonly TMP_DIR="\$ROOT_DIR"/tmp
|
||||||
readonly CONFIG_FILE="\$ROOT_DIR/sns.conf"
|
readonly CONFIG_FILE="\$ROOT_DIR/sns.conf"
|
||||||
|
|
||||||
|
printf "%s\n" "\$PROD_STR"
|
||||||
|
printf "%s\n" "------------------"
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ EOF
|
|||||||
|
|
||||||
chmod 600 "$CONFIG_FILE"
|
chmod 600 "$CONFIG_FILE"
|
||||||
|
|
||||||
printf " - %s\n" "Rewrote Default Configuration"
|
printf "\n - %s\n" "Rewrote Default Configuration"
|
||||||
|
|
||||||
if [ "$WILL_INIT" == "TRUE" ]; then
|
if [ "$WILL_INIT" == "TRUE" ]; then
|
||||||
printf " - %s %s\n" "Environment initialized in" "$ROOT_DIR"
|
printf " - %s %s\n" "Environment initialized in" "$ROOT_DIR"
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#==============================================================================
|
#==============================================================================
|
||||||
# Stage 1: Read Configuration / Verify Integrity
|
# Stage 1: Read Configuration / Verify Integrity
|
||||||
#==============================================================================
|
#==============================================================================
|
||||||
|
|
||||||
if [ -r "$CONFIG_FILE" ]; then
|
if [ -r "$CONFIG_FILE" ]; then
|
||||||
source "$CONFIG_FILE"
|
source "$CONFIG_FILE"
|
||||||
else
|
else
|
||||||
@@ -24,14 +25,11 @@
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$ENCRYPTION" == "TRUE" ]; then
|
if [ "$ENCRYPTION" == "TRUE" ]; then
|
||||||
PROD_STR="Simple Note System (Encryption Enabled)"
|
|
||||||
if [ ! -d "$ROOT_DIR"/tmp ]; then
|
if [ ! -d "$ROOT_DIR"/tmp ]; then
|
||||||
mkdir -p "$ROOT_DIR"/tmp
|
mkdir -p "$ROOT_DIR"/tmp
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$PROD_STR, $VER_STR"
|
|
||||||
|
|
||||||
if [ -n "$ERR_NO_GPG" ]; then
|
if [ -n "$ERR_NO_GPG" ]; then
|
||||||
>&2 echo " Error: Encryption was specified, but GPG is not installed."
|
>&2 echo " Error: Encryption was specified, but GPG is not installed."
|
||||||
exit 100
|
exit 100
|
||||||
|
|||||||
Reference in New Issue
Block a user