2019-08-13 18:35:36 +00:00
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
|
|
|
|
import "fmt"
|
|
|
|
import "os"
|
|
|
|
|
|
|
|
|
|
|
|
import "github.com/volution/kawipiko/cmd/server"
|
|
|
|
import "github.com/volution/kawipiko/cmd/archiver"
|
2022-09-02 10:59:46 +00:00
|
|
|
import "github.com/volution/kawipiko/cmd/version"
|
2019-08-13 18:35:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func main () () {
|
|
|
|
|
|
|
|
if len (os.Args) >= 2 {
|
|
|
|
|
|
|
|
_command := os.Args[1]
|
|
|
|
os.Args = os.Args[1:]
|
|
|
|
|
|
|
|
switch _command {
|
|
|
|
|
2022-09-02 10:59:46 +00:00
|
|
|
case "version", "--version", "-v" :
|
|
|
|
version.Main ("kawipiko-wrapper")
|
|
|
|
|
2019-08-13 18:35:36 +00:00
|
|
|
case "server" :
|
|
|
|
server.Main ()
|
|
|
|
|
|
|
|
case "archiver" :
|
|
|
|
archiver.Main ()
|
|
|
|
|
|
|
|
default :
|
|
|
|
fmt.Fprintf (os.Stderr, "[!!] [44887671] unknown command: `%s`; aborting!\n", _command)
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
2022-09-02 10:59:46 +00:00
|
|
|
fmt.Fprintf (os.Stderr, "[!!] [3628f38a] expected command: `server`, `archiver`, or `version`; aborting!\n")
|
2019-08-13 18:35:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|