Add a clean subcommand
Signed-off-by: Izuru Yakumo <yakumo.izuru@chaotic.ninja> git-svn-id: file:///srv/svn/repo/aya/trunk@63 cec141ff-132a-4243-88a5-ce187bd62f94
This commit is contained in:
@@ -380,6 +380,7 @@ func printUsage() {
|
||||
fmt.Printf("\n")
|
||||
fmt.Printf("Where <command> is:\n")
|
||||
fmt.Printf("\tbuild\tGenerate site\n")
|
||||
fmt.Printf("\tclean\tRemoves the generated site directory\n")
|
||||
fmt.Printf("\tserve\tServe %v over HTTP\n", PUBDIR)
|
||||
fmt.Printf("\tvar\tQuery variable(s) from a markdown file\n")
|
||||
fmt.Printf("\tversion\tPrint program version and exit\n")
|
||||
@@ -406,6 +407,9 @@ func main() {
|
||||
} else {
|
||||
fmt.Println("ERROR: too many arguments")
|
||||
}
|
||||
case "clean":
|
||||
fmt.Println("Removing generated site directory")
|
||||
os.RemoveAll(PUBDIR)
|
||||
case "serve":
|
||||
servePubDir()
|
||||
case "var":
|
||||
|
||||
Reference in New Issue
Block a user