diff options
| author | Horus3 | 2015-03-30 00:45:51 +0200 |
|---|---|---|
| committer | Horus3 | 2015-03-30 00:45:51 +0200 |
| commit | 0ed7ccc6c1e1d41bb7fbea3111fe509da32e50fa (patch) | |
| tree | e7b695650d1304ee7643ba5be11ae6be359b3e15 /Makefile | |
| parent | 4fc5294bf43583f3b42768a07c13f40913f92623 (diff) | |
| download | freemail-0ed7ccc6c1e1d41bb7fbea3111fe509da32e50fa.tar.gz | |
Improve Makefile vagrant
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -90,6 +90,9 @@ pack: gen_config echo "#!/bin/sh" > start.sh && \ echo ". ./_env.sh && ./$(APP)" >> start.sh && \ chmod +x start.sh && \ + if [ ! -d $(FREEMAIL_DB_DIR) ]; then \ + mkdir $(FREEMAIL_DB_DIR); \ + fi tar czf $(APP).tar.gz start.sh $(APP) _env.sh views static $(FREEMAIL_DB_DIR) 2>/dev/null && \ rm start.sh 2>/dev/null && \ echo "\n/$(APP).tar.gz is ready." || \ @@ -140,13 +143,15 @@ restart: kill build run go_get: go get github.com/jinzhu/gorm - go get github.com/mattn/go-sqlite3 go get github.com/gorilla/mux go get github.com/gorilla/schema go get github.com/gorilla/sessions + go get github.com/mattn/go-sqlite3 + go get github.com/go-sql-driver/mysql + go get github.com/lib/pq _test_archiv: - @if [ ! -f ./$(APP).tar.gz ] || [ ! -x ./$(APP).tar.gz ]; then \ + @if [ ! -f ./$(APP).tar.gz ]; then \ echo "No archive found." 1>&2; \ echo "Run \"make pack\" first." 1>&2; \ echo ""; \ @@ -160,5 +165,5 @@ _test_vagrant_env: exit 1; \ fi -vagrant: _test_archiv _test_vagrant_env +vagrant: _test_vagrant_env go_get build pack mv $(APP).tar.gz $(VAGRANT_DIR) |
