forked from tildetown/tilde-wiki
leave publish dir open to other compliations
parent
22e6d5735f
commit
c8f2c3b72f
|
@ -145,6 +145,7 @@ def publish(config, local_repo_path):
|
||||||
click.confirm(WIPE_PROMPT.format(config.publish_path), abort=True)
|
click.confirm(WIPE_PROMPT.format(config.publish_path), abort=True)
|
||||||
clear_directory(config.publish_path)
|
clear_directory(config.publish_path)
|
||||||
compile_wiki(config.repo_path, config.publish_path)
|
compile_wiki(config.repo_path, config.publish_path)
|
||||||
|
world_readablize(config.publish_path)
|
||||||
except ClickException:
|
except ClickException:
|
||||||
raise
|
raise
|
||||||
except Abort:
|
except Abort:
|
||||||
|
@ -204,6 +205,11 @@ def _preview(preview_path, local_repo_path):
|
||||||
click.echo('Your wiki preview is ready! navigate to ~{}/wiki'.format(
|
click.echo('Your wiki preview is ready! navigate to ~{}/wiki'.format(
|
||||||
os.environ.get('LOGNAME')))
|
os.environ.get('LOGNAME')))
|
||||||
|
|
||||||
|
def world_readablize(path: str) -> None:
|
||||||
|
"""Given a path to a directory, recursively make it world readable."""
|
||||||
|
# TODO the correct way to do this is with a wiki group
|
||||||
|
subprocess.run(['chmod', '-R', 'o+w', path], check=True)
|
||||||
|
|
||||||
def clear_directory(path:str) -> None:
|
def clear_directory(path:str) -> None:
|
||||||
"""Given a path to a directory, deletes everything in it. Use with
|
"""Given a path to a directory, deletes everything in it. Use with
|
||||||
caution."""
|
caution."""
|
||||||
|
|
Loading…
Reference in New Issue