implement -c
This commit is contained in:
parent
1a9758a251
commit
37df18f45d
8
atom
8
atom
@ -43,6 +43,8 @@ declare -r \
|
|||||||
\
|
\
|
||||||
oldIFS="$IFS"
|
oldIFS="$IFS"
|
||||||
|
|
||||||
|
cffile="$HOME/.atom/atom.cfg"
|
||||||
|
|
||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
|
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
@ -96,16 +98,16 @@ done
|
|||||||
|
|
||||||
#FIXME: check sanity
|
#FIXME: check sanity
|
||||||
|
|
||||||
if [ ! -f ~/.atom/atom.cfg ]
|
if [ ! -f "$cffile" ]
|
||||||
then
|
then
|
||||||
if [ ! -d ~/.atom ]
|
if [ ! -d ~/.atom ]
|
||||||
then
|
then
|
||||||
mkdir -p ~/.atom
|
mkdir -p ~/.atom
|
||||||
fi
|
fi
|
||||||
sed "s:%HOME%:$HOME:" "$exampleconf" > ~/.atom/atom.cfg
|
sed "s:%HOME%:$HOME:" "$exampleconf" > "$cffile"
|
||||||
cat >&2 <<-EOCfgNotice
|
cat >&2 <<-EOCfgNotice
|
||||||
No configuration file found!
|
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.
|
You should change it to your likings using you favorite editor.
|
||||||
|
|
||||||
Bailing out.
|
Bailing out.
|
||||||
|
|||||||
@ -24,5 +24,5 @@ getConfig() {
|
|||||||
getConfig$context
|
getConfig$context
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done < ~/.atom/atom.cfg
|
done < "$cffile"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,8 @@
|
|||||||
printConfig() {
|
printConfig() {
|
||||||
{
|
{
|
||||||
cat <<-EOF
|
cat <<-EOF
|
||||||
General|Load|$maxload
|
General|Config file|$cffile
|
||||||
|
|Load|$maxload
|
||||||
|Load Interval|$loadinterval
|
|Load Interval|$loadinterval
|
||||||
|Temp Dir|$tempdir
|
|Temp Dir|$tempdir
|
||||||
|Database|$database
|
|Database|$database
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user