add help text

This commit is contained in:
stupidcomputer 2025-01-07 17:38:35 -06:00
parent ae6a433484
commit fad0555960

View File

@ -5,7 +5,10 @@ import sys
import os
def main(args=sys.argv):
command = args[1]
try:
command = args[1]
except IndexError:
command = "nonexistent"
if command == "rebuild":
cwd = os.getcwd()
@ -15,3 +18,16 @@ def main(args=sys.argv):
os.execv('/bin/sh', ['/bin/sh', '.deploy'])
elif command == "update":
sssg.liveupdate.liveupdate()
else:
help_text = """
sssg - the stupid static site generator
usage: sssg [verb]
verb: one of
rebuild -- rebuilds the static site into output/
deploy -- executes the deploy script
update -- rebuild the static site upon any change
"""
print(help_text)