mirror of
https://github.com/taigrr/mg.git
synced 2026-04-02 03:28:42 -07:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
991985ab4e | ||
| 417cf943fa |
@@ -52,7 +52,7 @@ var (
|
|||||||
log.Printf("attempting clone: %s\n", repo.Path)
|
log.Printf("attempting clone: %s\n", repo.Path)
|
||||||
parentPath := filepath.Dir(repo.Path)
|
parentPath := filepath.Dir(repo.Path)
|
||||||
if _, err := os.Stat(parentPath); err != nil {
|
if _, err := os.Stat(parentPath); err != nil {
|
||||||
os.MkdirAll(parentPath, os.ModeDir)
|
os.MkdirAll(parentPath, os.ModeDir|os.ModePerm)
|
||||||
}
|
}
|
||||||
_, err = git.PlainClone(repo.Path, false, &git.CloneOptions{
|
_, err = git.PlainClone(repo.Path, false, &git.CloneOptions{
|
||||||
URL: repo.Remote,
|
URL: repo.Remote,
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ var (
|
|||||||
jobs int
|
jobs int
|
||||||
pullCmd = &cobra.Command{
|
pullCmd = &cobra.Command{
|
||||||
Use: "pull",
|
Use: "pull",
|
||||||
Short: "add current path to list of repos",
|
Short: "update all git repos specified in config",
|
||||||
Run: func(_ *cobra.Command, args []string) {
|
Run: func(_ *cobra.Command, args []string) {
|
||||||
type RepoError struct {
|
type RepoError struct {
|
||||||
Error error
|
Error error
|
||||||
|
|||||||
Reference in New Issue
Block a user