From aebdd51d08fa306fe3bb4f17b9e546d720dcef8a Mon Sep 17 00:00:00 2001 From: endorphant Date: Thu, 9 Jun 2016 21:18:34 -0400 Subject: [PATCH] fixing publishing issue with updating from <0.8.6 previously, symlinks were not being created correctly; this commit should address that. --- bin/_ttbp.py | 13 +++++++++---- bin/ttbp.py | 11 ++++++++--- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/bin/_ttbp.py b/bin/_ttbp.py index 4911616..c1c4e7c 100644 --- a/bin/_ttbp.py +++ b/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": diff --git a/bin/ttbp.py b/bin/ttbp.py index 28bbafe..07fb04f 100644 --- a/bin/ttbp.py +++ b/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":