add --force-settings
This commit is contained in:
parent
387eb5f24c
commit
8d223ad67d
13
setup.py
13
setup.py
@ -1,13 +1,19 @@
|
||||
#!/bin/python
|
||||
#https://python-packaging.readthedocs.io/en/latest/minimal.html
|
||||
import os, glob
|
||||
import os, glob, sys
|
||||
import os.path
|
||||
from shutil import copyfile
|
||||
from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
|
||||
fenrirVersion = '1.5'
|
||||
packageVersion = 'post6'
|
||||
packageVersion = 'post8'
|
||||
|
||||
# handle flags for package manager like yaourt and pacaur.
|
||||
forceSettings = False
|
||||
if "--force-settings" in sys.argv:
|
||||
forceSettings = True
|
||||
sys.argv.remove("--force-settings")
|
||||
|
||||
data_files = []
|
||||
directories = glob.glob('config/*')
|
||||
@ -20,6 +26,7 @@ for directory in directories:
|
||||
destDir = '/etc/fenrir/keyboard'
|
||||
elif 'config/settings' in directory:
|
||||
destDir = '/etc/fenrir/settings'
|
||||
if not forceSettings:
|
||||
try:
|
||||
del(files[files.index('config/settings/settings.conf')])
|
||||
except:
|
||||
@ -94,6 +101,7 @@ setup(
|
||||
|
||||
)
|
||||
|
||||
if not forceSettings:
|
||||
print('')
|
||||
# create settings file from example if not exist
|
||||
if not os.path.isfile('/etc/fenrir/settings/settings.conf'):
|
||||
@ -104,6 +112,7 @@ if not os.path.isfile('/etc/fenrir/settings/settings.conf'):
|
||||
pass
|
||||
else:
|
||||
print('settings.conf file found. It is not overwritten automatical')
|
||||
|
||||
print('')
|
||||
print('To have Fenrir start at boot:')
|
||||
print('sudo systemctl enable fenrir')
|
||||
|
Loading…
Reference in New Issue
Block a user