Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "ssh", Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) (err error) { defer try.Handle(&err) prefix := try.E1(cmd.Flags().GetString("prefix")) home := try.E1(os.UserHomeDir()) targetDirectory := filepath.Join(home, ".ssh") configSrc := filepath.Join(prefix, "ssh", "config") if try.E1(pa.Exists(configSrc)) { try.E(ex.Command("install", "-D", "--mode", "u=rw,go=r", "--target-directory", targetDirectory, configSrc).Bind().Run()) } for _, keyType := range keyTypes { keySrc := filepath.Join(prefix, "ssh", "id_"+keyType) pubKeySrc := keySrc + ".pub" if try.E1(pa.Exists(keySrc)) { try.E(ex.Command("install", "-D", "--mode", "u=rw,go=", "--target-directory", targetDirectory, keySrc).Bind().Run()) try.E(ex.Command("install", "-D", "--mode", "u=rw,go=r", "--target-directory", targetDirectory, pubKeySrc).Bind().Run()) } } return nil }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.