Work started on python config editor. Nearly have path stuff working.
This commit is contained in:
parent
2b3b2f34a4
commit
ee954c468f
21
src/fenrir-package/utils/fenrir-config.py
Normal file
21
src/fenrir-package/utils/fenrir-config.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
import configparser
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
from os import listdir
|
||||||
|
from os.path import isfile, join
|
||||||
|
from inspect import isfunction
|
||||||
|
from xdg import BaseDirectory
|
||||||
|
|
||||||
|
# Get configuration directory
|
||||||
|
if len(sys.argv) > 1:
|
||||||
|
configPath = sys.argv[1]
|
||||||
|
else if os.geteuid() == 0:
|
||||||
|
# Save settings system wide
|
||||||
|
configPath = "/etc"
|
||||||
|
else
|
||||||
|
# Use local settings
|
||||||
|
configPath = BaseDirectory.xdg_config_data + "/fenrir"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user