21 lines
443 B
Go
21 lines
443 B
Go
package clientcmd
|
|
|
|
import (
|
|
"fmt"
|
|
"log"
|
|
"os"
|
|
)
|
|
|
|
// InitializeRepo creates the repo directory and a new config file
|
|
func InitializeRepo() {
|
|
cwd, err := os.Getwd()
|
|
if err != nil {
|
|
log.Fatal("unable to get current working directory.. permissions issue?")
|
|
}
|
|
fmt.Println("Initializing repo in dir: ", cwd)
|
|
err = os.Mkdir(".gvc", 0644)
|
|
if err != nil {
|
|
fmt.Println(".gvc directory already exists, but no config file... continuing")
|
|
}
|
|
}
|