Skip to content

Commit

Permalink
makefile with update flag and cache final implementation for freebsd
Browse files Browse the repository at this point in the history
  • Loading branch information
ghophp committed Nov 26, 2015
1 parent 57bd221 commit 8030be5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ BIN_NAME=buildbot-dashboard
all: build test

special-deps:
${GO} get -d github.com/ghophp/buildbot-dashboard
${GO} get -u -d github.com/ghophp/buildbot-dashboard

deps:
${GO} get gopkg.in/check.v1
Expand Down
8 changes: 6 additions & 2 deletions cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import (
"io/ioutil"
"os"
"os/user"
"path/filepath"
"time"
)

const InternalCacheFolder string = ".bbd/"
const InternalCacheFolder string = ".bbd"

type Cache struct {
refreshTime int
Expand All @@ -26,7 +27,10 @@ func NewCache(t int) *Cache {
return cc
}

cc.path = usr.HomeDir + "/" + InternalCacheFolder
cc.path = usr.HomeDir +
string(filepath.Separator) +
InternalCacheFolder +
string(filepath.Separator)

_, err = os.Stat(cc.path)
if os.IsNotExist(err) {
Expand Down

0 comments on commit 8030be5

Please sign in to comment.