Skip to content

Commit

Permalink
*: init boilr automatically
Browse files Browse the repository at this point in the history
Signed-off-by: David McKay <david@rawkode.com>
  • Loading branch information
rawkode authored and tmrts committed Mar 4, 2017
1 parent 6c76523 commit 25bf3bf
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions boilr.go
@@ -1,7 +1,22 @@
package main

import "github.com/tmrts/boilr/pkg/cmd"
import (
"fmt"
"github.com/tmrts/boilr/pkg/boilr"
"github.com/tmrts/boilr/pkg/cmd"
"github.com/tmrts/boilr/pkg/util/exit"
"github.com/tmrts/boilr/pkg/util/osutil"
)

func main() {
cmd.Run()
if exists, err := osutil.DirExists(boilr.Configuration.TemplateDirPath); ! exists {
if err := osutil.CreateDirs(boilr.Configuration.TemplateDirPath); err != nil {
exit.Error(fmt.Errorf("Tried to initialise your template directory, but it has failed: %s", err))
}
} else if err != nil {
exit.Error(fmt.Errorf("Failed to init: %s", err))
}

cmd.Run()
}

0 comments on commit 25bf3bf

Please sign in to comment.