|
|
|
@ -21,7 +21,7 @@ const usage = `workspace - Use a containerized workspace
|
|
|
|
|
COMMANDS
|
|
|
|
|
|
|
|
|
|
dump-init-files: Dump emacs/bash init files to home directory, overwriting existing files.
|
|
|
|
|
List of files: ~/.bash_aliases, ~/.emacs, ~/.custom.el
|
|
|
|
|
List of files: ~/.bash_aliases, ~/.emacs, ~/.custom.el, ~/.gitconfig, ~/.gitignore
|
|
|
|
|
|
|
|
|
|
toggle-nightlight: Toggle Gnome display nightlight feature.
|
|
|
|
|
`
|
|
|
|
@ -55,7 +55,6 @@ func AddUser(username string, uid string) error {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if os.Getenv("WORKSPACE_OS") == "darwin" {
|
|
|
|
|
log.Println(fmt.Sprintf("Note: Workspce OS is \"%s\"", os.Getenv("WORKSPACE_OS")))
|
|
|
|
|
commandArgs = append(commandArgs, "--create-home")
|
|
|
|
|
} else {
|
|
|
|
|
commandArgs = append(commandArgs, "--no-create-home")
|
|
|
|
@ -96,7 +95,15 @@ func AddGroup(name string, gid string) error {
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const osDarwin = "darwin"
|
|
|
|
|
const osLinux = "linux"
|
|
|
|
|
|
|
|
|
|
func EntryPoint(command []string) error {
|
|
|
|
|
hostOS := os.Getenv("WORKSPACE_OS")
|
|
|
|
|
if hostOS != osLinux {
|
|
|
|
|
log.Println(fmt.Sprintf("Note: Workspce OS is \"%s\"", hostOS))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if len(command) == 0 {
|
|
|
|
|
command = []string{"/bin/bash", "-i"}
|
|
|
|
|
}
|
|
|
|
|