File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,10 +6,14 @@ import (
66
77 "github.com/Tom5521/ArchLinuxInstaller/data"
88 "github.com/Tom5521/ArchLinuxInstaller/src"
9- "github.com/Tom5521/MyGolangTools/commands "
9+ "github.com/Tom5521/CmdRunTools/command "
1010)
1111
12- var sh = commands.Sh {}
12+ var sh = func () command.UnixCmd {
13+ cmd := command .Cmd ("" )
14+ cmd .CustomStd (true , true , true )
15+ return cmd
16+ }()
1317
1418var HelpStr = `
1519Usage:
1822Arguments:
1923- help Print this text
2024
25+ - version Print the current version of the binary
26+
2127- install Run all the nesesary functions to install completely Arch Linux
2228
2329- pacstrap Only runs the pacstrap functions
@@ -68,6 +74,8 @@ func main() {
6874 return
6975 }
7076 switch os .Args [1 ] {
77+ case "version" :
78+ fmt .Println ()
7179 case "help" :
7280 PrintHelp ()
7381 case "passwd" :
@@ -100,7 +108,7 @@ func main() {
100108 src .Mount ()
101109 case "newconfig" :
102110 data .NewYamlFile ()
103- err := sh .Cmd ("vim " + data .Pfilename )
111+ err := sh .SetAndRun ("vim " + data .Pfilename )
104112 if err != nil {
105113 src .Error ("Error oppening vim.\n " + err .Error ())
106114 }
You can’t perform that action at this time.
0 commit comments