Add a set of spaces to prefix config variables when setting them

This commit is contained in:
Jose Diaz-Gonzalez
2014-11-15 22:11:55 -05:00
parent 043a1a01c5
commit 0f31ff1f24

View File

@@ -26,6 +26,7 @@ fi
config_styled_hash () { config_styled_hash () {
vars="$1" vars="$1"
prefix="$2"
longest="" longest=""
while read -r word; do while read -r word; do
@@ -45,7 +46,7 @@ config_styled_hash () {
zeros="$zeros " zeros="$zeros "
num_zeros=$(($num_zeros - 1)) num_zeros=$(($num_zeros - 1))
done done
echo "$KEY:$zeros$VALUE" echo "$prefix$KEY:$zeros$VALUE"
done <<< "$vars" done <<< "$vars"
} }
@@ -147,7 +148,7 @@ ${var}"
if [ $RESTART_APP ]; then if [ $RESTART_APP ]; then
echo "-----> Setting config vars and restarting $APP" echo "-----> Setting config vars and restarting $APP"
config_styled_hash "$ENV_ADD" config_styled_hash "$ENV_ADD" " "
config_write "$ENV_TEMP" config_write "$ENV_TEMP"
fi fi