2021-05-24 00:11:57 +03:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
|
|
|
|
goflags "github.com/jessevdk/go-flags"
|
2021-05-24 00:11:58 +03:00
|
|
|
|
2021-05-24 00:11:58 +03:00
|
|
|
"github.com/motiejus/code/undocker/internal/cmdlxcconfig"
|
2021-05-24 00:11:58 +03:00
|
|
|
"github.com/motiejus/code/undocker/internal/cmdrootfs"
|
2021-05-24 00:11:57 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2021-05-24 00:11:58 +03:00
|
|
|
flags := goflags.NewParser(nil, goflags.Default)
|
|
|
|
|
|
|
|
rootfs := cmdrootfs.NewCommand()
|
|
|
|
lxcconfig := cmdlxcconfig.NewCommand()
|
|
|
|
flags.AddCommand("rootfs", rootfs.ShortDesc(), rootfs.LongDesc(), rootfs)
|
|
|
|
flags.AddCommand("lxcconfig", lxcconfig.ShortDesc(), lxcconfig.LongDesc(), lxcconfig)
|
|
|
|
|
|
|
|
_, err := flags.Parse()
|
|
|
|
if err != nil {
|
2021-05-24 00:11:57 +03:00
|
|
|
os.Exit(1)
|
|
|
|
}
|
|
|
|
os.Exit(0)
|
|
|
|
}
|