- Timestamp:
- Dec 4, 2023, 2:21:03 AM (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cmd/aya/main.go
r75 r76 1 // $TheSupernovaDuo: marisa.chaotic.ninja/aya/cmd/aya, v0.6. 6 2023-12-03 23:48:17+0000, yakumo_izuru Exp $1 // $TheSupernovaDuo: marisa.chaotic.ninja/aya/cmd/aya, v0.6.7 2023-12-04 01:55:36+0000, yakumo_izuru Exp $ 2 2 package main 3 3 … … 376 376 } 377 377 378 // Print usage notes379 func printUsage() {380 fmt.Printf("Usage: %s <command> [args]\n", os.Args[0])381 fmt.Printf("Where <command> is one of\n")382 fmt.Printf("\n")383 fmt.Printf("\tbuild\t(Re-)builds site or a specific file\n")384 fmt.Printf("\tclean\trm -rf %s\n", PUBDIR)385 fmt.Printf("\tserve\tServes the %s directory over HTTP\n", PUBDIR)386 fmt.Printf("\tvar\tPrint a list of variables defined in a given file, or values of certain variables\n")387 fmt.Printf("\twatch\t(Re-)builds site and looks for changes\n")388 os.Exit(0)389 }390 391 378 // Main loop 392 379 func main() { 393 380 if len(os.Args) == 1 { 394 printUsage() 381 fmt.Println("No command supplied. See 'aya help'") 382 os.Exit(1) 395 383 } 396 384 cmd := os.Args[1] … … 413 401 os.RemoveAll(PUBDIR) 414 402 case "help": 415 printUsage()403 aya.PrintUsage() 416 404 case "serve": 417 405 aya.HttpServe(PUBDIR)
Note:
See TracChangeset
for help on using the changeset viewer.