Merge pull request #53 from hjelev/dev1
fix path related bug in the update script
This commit is contained in:
@@ -39,11 +39,11 @@ def display_config_differences(current_config, example_config, display=True):
|
|||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def update_config_version(version):
|
def update_config_version(version, script_dir):
|
||||||
with open('config.py', 'r') as f:
|
with open(script_dir + '/config.py', 'r') as f:
|
||||||
lines = f.readlines()
|
lines = f.readlines()
|
||||||
|
|
||||||
with open('config.py', 'w') as f:
|
with open(script_dir + '/config.py', 'w') as f:
|
||||||
print(":: Updating config version to {}".format(version))
|
print(":: Updating config version to {}".format(version))
|
||||||
for line in lines:
|
for line in lines:
|
||||||
if 'version = ' in line:
|
if 'version = ' in line:
|
||||||
@@ -65,7 +65,7 @@ def do_update(version=config.version, git_update=True, config_update=True):
|
|||||||
update_config(script_dir + 'config.py',script_dir + 'config.py.example')
|
update_config(script_dir + 'config.py',script_dir + 'config.py.example')
|
||||||
|
|
||||||
if version != config.version:
|
if version != config.version:
|
||||||
update_config_version(version)
|
update_config_version(version, script_dir)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
Reference in New Issue
Block a user