From 1577808844ae79a44f163683477278433f016d74 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Thu, 8 Nov 2018 14:09:32 +0100 Subject: [PATCH] init /cmd script --- cmd/nix-amer/help.go | 49 ++++++++++++++++++++++++++++++++++++++++++++ cmd/nix-amer/main.go | 5 +++++ 2 files changed, 54 insertions(+) create mode 100644 cmd/nix-amer/help.go create mode 100644 cmd/nix-amer/main.go diff --git a/cmd/nix-amer/help.go b/cmd/nix-amer/help.go new file mode 100644 index 0000000..73a0165 --- /dev/null +++ b/cmd/nix-amer/help.go @@ -0,0 +1,49 @@ +package main + +import ( + "fmt" + "git.xdrm.io/xdrm-brackets/nix-amer/internal/clifmt" +) + +func help() { + + fmt.Printf("%s\n", clifmt.Color(1, "NAME", true)) + fmt.Printf("\tnix-amer - the automatic setup tool you need\n") + + fmt.Printf("\n%s\n", clifmt.Color(1, "SYNOPSIS", true)) + fmt.Printf("\tnix-amer [-d [-p ] [-s ] \n") + fmt.Printf("\tnix-amer -help\n") + fmt.Printf("\tnix-amer -h\n") + fmt.Printf("\n") + + fmt.Printf("\n%s\n", clifmt.Color(1, "DESCRIPTION", true)) + fmt.Printf("\tnix-amer allows you to automate a complete linux setup. If you have a server\n") + fmt.Printf("\tor a desktop it will ease your life ! It features package management (install,\n") + fmt.Printf("\tdeletion, update), services and configuration through a simple interface.\n") + fmt.Printf("\tIts best feature is the configuration understanding ; nix-amer can understand\n") + fmt.Printf("\tseveral complex configuration formats and allow you to add or update fields\n") + fmt.Printf("\tdirectly with a simple path format : config/file@parentField.childField. This\n") + fmt.Printf("\tworks with 'json', 'xml', 'yaml', 'ini', 'toml', and the 'nginx' specific\n") + fmt.Printf("\tformat too !!!! :O enjoy\n") + + fmt.Printf("\n%s\n", clifmt.Color(1, "OPTIONS", true)) + + fmt.Printf("\t-d, -distro\n\t Define which linux distribution the target will run on.\n") + fmt.Printf("\t Available values are 'debian', 'ubuntu', 'alpine', 'solus',\n") + fmt.Printf("\t 'arch', 'centos' and 'fedora'.\n") + fmt.Printf("\n") + + fmt.Printf("\t-p, -package\n\t Define which package manager to use ; normally it is\n") + fmt.Printf("\t automatically guessed if you define the -distro. Available\n") + fmt.Printf("\t values are 'apt-get', 'eopkg', 'apk', 'yum', 'dnf' and 'pacman'.\n") + fmt.Printf("\n") + fmt.Printf("\t-s, -service\n\t Define which service manager to use ; the default\n") + fmt.Printf("\t value is 'systemd'. initd is not yet supported.\n") + fmt.Printf("\n") + + fmt.Printf("%s\n", clifmt.Color(1, "AUTHORS", true)) + fmt.Printf("\tnix-amer has been entirely designed and developped by xdrm-brackets\n") + fmt.Printf("\t. Feedback really is appreciated, feel\n") + fmt.Printf("\tfree to mail me.\n") + +} diff --git a/cmd/nix-amer/main.go b/cmd/nix-amer/main.go new file mode 100644 index 0000000..189984c --- /dev/null +++ b/cmd/nix-amer/main.go @@ -0,0 +1,5 @@ +package main + +func main() { + help() +}