aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2013-10-21 23:28:03 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2013-10-21 23:28:03 +0200
commit22f0f794ac4e40866c5d390a7b27b8bd6713e681 (patch)
treeda5f9febae11d7819a0d908b9505997575b04628 /lib
parent989edff55111db3b457c9e04f3abf296e6ac555c (diff)
downloadapp.sh-22f0f794ac4e40866c5d390a7b27b8bd6713e681.tar.gz
app.sh-22f0f794ac4e40866c5d390a7b27b8bd6713e681.tar.bz2
app.sh-22f0f794ac4e40866c5d390a7b27b8bd6713e681.tar.xz
app.sh-22f0f794ac4e40866c5d390a7b27b8bd6713e681.zip
o Removing silly formatting that left extra spaced at the end of
lines. o Fixing bug in app-conf get subcommand that would only return the first part of values with an equals sign. o Makding sure $HOME is always set.
Diffstat (limited to 'lib')
-rwxr-xr-xlib/common10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/common b/lib/common
index 9e0db84..be3daae 100755
--- a/lib/common
+++ b/lib/common
@@ -199,7 +199,12 @@ _get_config_file_system() {
}
_get_config_file_user() {
- eval $1="$HOME/.appconfig"
+ if [[ -z $HOME ]]
+ then
+ eval $1=""
+ else
+ eval $1="$HOME/.appconfig"
+ fi
}
_get_config_file_app() {
@@ -289,6 +294,9 @@ find_resolver() {
# overload their implementations.
PATH=$PATH:$APPSH_HOME/bin:$APPSH_HOME/libexec
+# Make sure that $HOME is present to prevent unbound errors
+HOME=${HOME:-}
+
# Save for later
usage_app=${0##*/}
echo_debug=${echo_debug-no}