summaryrefslogtreecommitdiff
path: root/cmd/ponzu/options.go
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-12-18 15:30:06 -0800
committerSteve Manuel <nilslice@gmail.com>2016-12-18 15:30:06 -0800
commitda2ec11664c48ba9dced011e66a13a75ed417640 (patch)
tree57a4897f1f1e0670ffde2995a7074bda1caa0fd5 /cmd/ponzu/options.go
parente187d5ee6354acf40ac8178b0a8a631e80e35e8e (diff)
make sure user content dir exists in new project
Diffstat (limited to 'cmd/ponzu/options.go')
-rw-r--r--cmd/ponzu/options.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/cmd/ponzu/options.go b/cmd/ponzu/options.go
index 6384b47..b22f0d2 100644
--- a/cmd/ponzu/options.go
+++ b/cmd/ponzu/options.go
@@ -150,6 +150,13 @@ func vendorCorePackages(path string) error {
return err
}
+ // create a user content directory
+ contentPath := filepath.Join(path, "content")
+ err = os.Mkdir(contentPath, os.ModeDir|os.ModePerm)
+ if err != nil {
+ return err
+ }
+
dirs := []string{"content", "management", "system"}
for _, dir := range dirs {
err = os.Rename(filepath.Join(path, dir), filepath.Join(vendorPath, dir))
@@ -158,13 +165,6 @@ func vendorCorePackages(path string) error {
}
}
- // create a user content directory
- contentPath := filepath.Join(path, "content")
- err = os.Mkdir(contentPath, os.ModeDir|os.ModePerm)
- if err != nil {
- return err
- }
-
return nil
}
@@ -248,7 +248,7 @@ func buildPonzuServer(args []string) error {
// copy all ./content files to internal vendor directory
src := "content"
dst := filepath.Join("cmd", "ponzu", "vendor", "github.com", "bosssauce", "ponzu", "content")
- err = copyFilesWarnConflicts(src, dst, []string{"item.go", "types.go", "references.go"})
+ err = copyFilesWarnConflicts(src, dst, []string{})
if err != nil {
return err
}