From d0c1e5ff6d8a821db13ae486ff195f4e358a7484 Mon Sep 17 00:00:00 2001 From: endorphant Date: Wed, 7 Sep 2016 22:29:12 -0400 Subject: [PATCH] minor update synchronizing --- bin/_ttbp.py | 31 ++++++++++++++++--------------- bin/ttbp.py | 2 +- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/bin/_ttbp.py b/bin/_ttbp.py index 0b8f1ad..578b5b3 100644 --- a/bin/_ttbp.py +++ b/bin/_ttbp.py @@ -990,26 +990,27 @@ def update_version(): # from 0.8.5 to 0.8.6: # change style.css location - if os.path.isfile(os.path.join(WWW, "style.css")): - subprocess.call(["mv", os.path.join(WWW, "style.css"), CONFIG]) + if core.publishing(): + if os.path.isfile(os.path.join(WWW, "style.css")): + subprocess.call(["mv", os.path.join(WWW, "style.css"), CONFIG]) - # change www symlink - if os.path.exists(WWW): - subprocess.call(["rm", WWW]) - - subprocess.call(["mkdir", WWW]) + # change www symlink + if os.path.exists(WWW): + subprocess.call(["rm", WWW]) - subprocess.call(["ln", "-s", os.path.join(CONFIG, "style.css"), os.path.join(WWW, "style.css")]) + subprocess.call(["mkdir", WWW]) - publishDir = os.path.join(PUBLIC, SETTINGS.get("publish dir")) - if os.path.exists(publishDir): - subprocess.call(["rm", "-rf", publishDir]) + subprocess.call(["ln", "-s", os.path.join(CONFIG, "style.css"), os.path.join(WWW, "style.css")]) - subprocess.call(["ln", "-s", WWW, os.path.join(PUBLIC, SETTINGS.get("publish dir"))]) + publishDir = os.path.join(PUBLIC, SETTINGS.get("publish dir")) + if os.path.exists(publishDir): + subprocess.call(["rm", "-rf", publishDir]) - # repopulate html files - core.load_files() - core.write("index.html") + subprocess.call(["ln", "-s", WWW, os.path.join(PUBLIC, SETTINGS.get("publish dir"))]) + + # repopulate html files + core.load_files() + core.write("index.html") # add publishing setting print("\nnew feature!\n") diff --git a/bin/ttbp.py b/bin/ttbp.py index 51422b8..f44c71c 100644 --- a/bin/ttbp.py +++ b/bin/ttbp.py @@ -900,7 +900,7 @@ def update_version(): # change www symlink if os.path.exists(WWW): subprocess.call(["rm", WWW]) - + subprocess.call(["mkdir", WWW]) subprocess.call(["ln", "-s", os.path.join(CONFIG, "style.css"), os.path.join(WWW, "style.css")])