~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to bin/ivle-config

./etc is no longer a special case in the ivle.conf search path.

ivle-config also now respects the same search path when writing a config.
It will write to ivle.conf in the directory mentioned in $IVLECONF, or
/etc/ivle if $IVLECONF is unset.

Show diffs side-by-side

added added

removed removed

Lines of Context:
266
266
    cwd = os.getcwd()
267
267
 
268
268
    # the files that will be created/overwritten
269
 
    conffile = os.path.join(cwd, "etc/ivle.conf")
 
269
    try:
 
270
        confdir = os.environ['IVLECONF']
 
271
    except KeyError:
 
272
        confdir = '/etc/ivle'
 
273
 
 
274
    conffile = os.path.join(confdir, 'ivle.conf')
270
275
 
271
276
    # Get command-line arguments to avoid asking questions.
272
277