minor update synchronizing
parent
56419f2f43
commit
d0c1e5ff6d
29
bin/_ttbp.py
29
bin/_ttbp.py
|
@ -990,26 +990,27 @@ def update_version():
|
||||||
# from 0.8.5 to 0.8.6:
|
# from 0.8.5 to 0.8.6:
|
||||||
|
|
||||||
# change style.css location
|
# change style.css location
|
||||||
if os.path.isfile(os.path.join(WWW, "style.css")):
|
if core.publishing():
|
||||||
subprocess.call(["mv", os.path.join(WWW, "style.css"), CONFIG])
|
if os.path.isfile(os.path.join(WWW, "style.css")):
|
||||||
|
subprocess.call(["mv", os.path.join(WWW, "style.css"), CONFIG])
|
||||||
|
|
||||||
# change www symlink
|
# change www symlink
|
||||||
if os.path.exists(WWW):
|
if os.path.exists(WWW):
|
||||||
subprocess.call(["rm", WWW])
|
subprocess.call(["rm", WWW])
|
||||||
|
|
||||||
subprocess.call(["mkdir", WWW])
|
subprocess.call(["mkdir", WWW])
|
||||||
|
|
||||||
subprocess.call(["ln", "-s", os.path.join(CONFIG, "style.css"), os.path.join(WWW, "style.css")])
|
subprocess.call(["ln", "-s", os.path.join(CONFIG, "style.css"), os.path.join(WWW, "style.css")])
|
||||||
|
|
||||||
publishDir = os.path.join(PUBLIC, SETTINGS.get("publish dir"))
|
publishDir = os.path.join(PUBLIC, SETTINGS.get("publish dir"))
|
||||||
if os.path.exists(publishDir):
|
if os.path.exists(publishDir):
|
||||||
subprocess.call(["rm", "-rf", publishDir])
|
subprocess.call(["rm", "-rf", publishDir])
|
||||||
|
|
||||||
subprocess.call(["ln", "-s", WWW, os.path.join(PUBLIC, SETTINGS.get("publish dir"))])
|
subprocess.call(["ln", "-s", WWW, os.path.join(PUBLIC, SETTINGS.get("publish dir"))])
|
||||||
|
|
||||||
# repopulate html files
|
# repopulate html files
|
||||||
core.load_files()
|
core.load_files()
|
||||||
core.write("index.html")
|
core.write("index.html")
|
||||||
|
|
||||||
# add publishing setting
|
# add publishing setting
|
||||||
print("\nnew feature!\n")
|
print("\nnew feature!\n")
|
||||||
|
|
Loading…
Reference in New Issue