diff --git a/atom b/atom index ce5ceb6..23d8478 100755 --- a/atom +++ b/atom @@ -43,6 +43,8 @@ declare -r \ \ oldIFS="$IFS" +cffile="$HOME/.atom/atom.cfg" + LC_ALL=C shopt -s extglob @@ -96,16 +98,16 @@ done #FIXME: check sanity -if [ ! -f ~/.atom/atom.cfg ] +if [ ! -f "$cffile" ] then if [ ! -d ~/.atom ] then mkdir -p ~/.atom fi - sed "s:%HOME%:$HOME:" "$exampleconf" > ~/.atom/atom.cfg + sed "s:%HOME%:$HOME:" "$exampleconf" > "$cffile" cat >&2 <<-EOCfgNotice No configuration file found! - An example file has been created as ~/.atom/atom.cfg. + An example file has been created as "${cffile/$HOME/~}". You should change it to your likings using you favorite editor. Bailing out. diff --git a/lib/config/getConfig b/lib/config/getConfig index 9243fb1..cbc9b5f 100644 --- a/lib/config/getConfig +++ b/lib/config/getConfig @@ -24,5 +24,5 @@ getConfig() { getConfig$context ;; esac - done < ~/.atom/atom.cfg + done < "$cffile" } diff --git a/lib/config/print b/lib/config/print index 6722de6..bc189a0 100644 --- a/lib/config/print +++ b/lib/config/print @@ -2,7 +2,8 @@ printConfig() { { cat <<-EOF - General|Load|$maxload + General|Config file|$cffile + |Load|$maxload |Load Interval|$loadinterval |Temp Dir|$tempdir |Database|$database