forked from samizdatco/dvia-2019
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
21 lines (17 loc) · 810 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
SERVER=localhost
PORT=8000
HTTPD=node_modules/http-server/bin/http-server
ERR_MSG="\n`tput bold`The server appears to already be running at: http://$(SERVER):$(PORT)\nTake a look at your other terminal windows?"
$(HTTPD):
npm install --prefix=. --no-save $(notdir $(HTTPD))
# you only need to run this once in order to get `make update` to work. it updates your
# git config to watch the course repository for new assignments and the like
config:
git remote add upstream git://github.com/samizdatco/dvia-2019.git
git fetch upstream
# run `make update` to pull down changes whenever there's new material on the course repo
update:
git pull upstream master
# you can view your work via a local webserver with `make server`
server: $(HTTPD)
@$(HTTPD) . -a $(SERVER) -p $(PORT) -c-1 -o || echo $(ERR_MSG)