Sat, 04 Jul 2015 14:46:40 +0200
Little enhancement of the install script.
install.py | file | annotate | diff | comparison | revisions |
--- a/install.py Sat Jul 04 11:50:01 2015 +0200 +++ b/install.py Sat Jul 04 14:46:40 2015 +0200 @@ -1323,7 +1323,10 @@ if not fileName: return - os.rename(fileName, fileName + ".orig") + try: + os.rename(fileName, fileName + ".orig") + except EnvironmentError: + pass try: hgOut = subprocess.check_output(["hg", "identify", "-i"]) if sys.version_info[0] == 3: @@ -1340,7 +1343,8 @@ f = open(fileName + ".orig", "r", encoding="utf-8") text = f.read() f.close() - text = text.replace("@@REVISION@@", hgOut) + text = text.replace("@@REVISION@@", hgOut)\ + .replace("@@VERSION@@", "rev_" + hgOut) copyToFile(fileName, text) else: shutil.copy(fileName + ".orig", fileName)