implement -c
This commit is contained in:
parent
1a9758a251
commit
37df18f45d
8
atom
8
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.
|
||||
|
||||
@ -24,5 +24,5 @@ getConfig() {
|
||||
getConfig$context
|
||||
;;
|
||||
esac
|
||||
done < ~/.atom/atom.cfg
|
||||
done < "$cffile"
|
||||
}
|
||||
|
||||
@ -2,7 +2,8 @@
|
||||
printConfig() {
|
||||
{
|
||||
cat <<-EOF
|
||||
General|Load|$maxload
|
||||
General|Config file|$cffile
|
||||
|Load|$maxload
|
||||
|Load Interval|$loadinterval
|
||||
|Temp Dir|$tempdir
|
||||
|Database|$database
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user