forked from endorphant/ttbp
fixing publishing issue with updating from <0.8.6
previously, symlinks were not being created correctly; this commit should address that.master
parent
116be618a0
commit
aebdd51d08
13
bin/_ttbp.py
13
bin/_ttbp.py
|
@ -824,7 +824,7 @@ please enter\
|
|||
|
||||
def unpublish():
|
||||
'''
|
||||
remove user's published directory, if it exists
|
||||
remove user's published directory, if it exists. this should only remove the symlink in public_html.
|
||||
'''
|
||||
|
||||
dir = SETTINGS.get("publish dir")
|
||||
|
@ -956,14 +956,16 @@ def update_version():
|
|||
# change www symlink
|
||||
if os.path.exists(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")])
|
||||
|
||||
publishDir = os.path.join(PUBLIC, SETTINGS.get("publish dir"))
|
||||
if os.path.exists(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
|
||||
core.load_files()
|
||||
|
@ -991,7 +993,10 @@ def update_version():
|
|||
|
||||
# increment user versionfile
|
||||
open(versionFile, "w").write(__version__)
|
||||
print("\nyou're all good to go, "+chatter.say("friend")+"!\n")
|
||||
print("""
|
||||
you're all good to go, "+chatter.say("friend")+"! please contact ~endorphant if
|
||||
somehing strange happened to you during this update.
|
||||
""")
|
||||
|
||||
# show patch notes
|
||||
#if userVersion != "0.9.0" and userVersion != "0.9.0b":
|
||||
|
|
11
bin/ttbp.py
11
bin/ttbp.py
|
@ -893,14 +893,16 @@ def update_version():
|
|||
# change www symlink
|
||||
if os.path.exists(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")])
|
||||
|
||||
publishDir = os.path.join(PUBLIC, SETTINGS.get("publish dir"))
|
||||
if os.path.exists(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
|
||||
core.load_files()
|
||||
|
@ -928,7 +930,10 @@ def update_version():
|
|||
|
||||
# increment user versionfile
|
||||
open(versionFile, "w").write(__version__)
|
||||
print("\nyou're all good to go, "+chatter.say("friend")+"!\n")
|
||||
print("""
|
||||
you're all good to go, "+chatter.say("friend")+"! please contact ~endorphant if
|
||||
somehing strange happened to you during this update.
|
||||
""")
|
||||
|
||||
# show patch notes
|
||||
if userVersion != "0.9.0" and userVersion != "0.9.0b":
|
||||
|
|
Loading…
Reference in New Issue