add missing link cleanup subcommand.
This commit is contained in:
+13
-1
@@ -7,8 +7,9 @@ import (
|
||||
"os"
|
||||
)
|
||||
|
||||
const usage = "am <arr|help> [flags]"
|
||||
const usage = "am <arr|clean|help> [flags]"
|
||||
const arrUsage = "am arr [-h|-cores=N] <in> <out>"
|
||||
const cleanUsage = "am clean [-h|-cores=N] <directory>"
|
||||
|
||||
type stats struct {
|
||||
total int
|
||||
@@ -41,6 +42,17 @@ func main() {
|
||||
fmt.Fprintf(os.Stderr, "problem arranging media: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
case "c", "cl", "clean":
|
||||
args := flag.Args()
|
||||
if len(args) != 1 {
|
||||
fmt.Fprintf(os.Stderr, "%s\n", cleanUsage)
|
||||
os.Exit(1)
|
||||
}
|
||||
dir := args[0]
|
||||
if err := clean(dir); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "problem cleaning: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
default:
|
||||
fmt.Fprintf(os.Stderr, "%s\n", usage)
|
||||
os.Exit(1)
|
||||
|
||||
Reference in New Issue
Block a user