diff --git a/build.sh b/build.sh index 3b30651..a1f65a8 100755 --- a/build.sh +++ b/build.sh @@ -1,6 +1,6 @@ S=sns.sh -cat header.sh > "$S" +bash header.sh > "$S" echo -e "\n# Section: Functions" >> "$S" cat ./src/includes/w_conf.sns.sh >> "$S" cat ./src/includes/pause.sns.sh >> "$S" diff --git a/header.sh b/header.sh index e5d7bbb..c7b1aca 100644 --- a/header.sh +++ b/header.sh @@ -1,4 +1,10 @@ #!/bin/bash + +PROD_STR="Simple Note System" +VER_STR="v2.0a5" + +cat << EOF +#!/bin/bash #========================================================== # $PROD_STR, $VER_STR # Copyright 2014, Xenese Labs/Sicron-Perion XNF @@ -6,8 +12,10 @@ if [ -z "$HOME" ]; then HOME=/home/$(whoami); fi -PROD_STR="Simple Note System" -VER_STR="v2.0a5" +PROD_STR="$PROD_STR" +VER_STR="$VER_STR" ROOTDIR="$HOME"/.config/sns BASEDIR="$ROOTDIR"/notes CONFIGURATION="$ROOTDIR/sns.conf" + +EOF diff --git a/sns.sh b/sns.sh index 5045781..96a7e69 100755 --- a/sns.sh +++ b/sns.sh @@ -1,16 +1,17 @@ #!/bin/bash #========================================================== -# $PROD_STR, $VER_STR +# Simple Note System, v2.0a5 # Copyright 2014, Xenese Labs/Sicron-Perion XNF #========================================================== -if [ -z "$HOME" ]; then HOME=/home/$(whoami); fi +if [ -z "/Users/xilmwa" ]; then HOME=/home/xilmwa; fi PROD_STR="Simple Note System" VER_STR="v2.0a5" -ROOTDIR="$HOME"/.config/sns -BASEDIR="$ROOTDIR"/notes -CONFIGURATION="$ROOTDIR/sns.conf" +ROOTDIR="/Users/xilmwa"/.config/sns +BASEDIR=""/notes +CONFIGURATION="/sns.conf" + # Section: Functions function w_conf { @@ -276,7 +277,7 @@ else fi # Note: w_conf and help have highest priority, as they are the only functions -# that can work without any parameters. +# that can work without any arguments. #============================================================================== # End Section: Argument Parsing