Skip to content

Instantly share code, notes, and snippets.

@poying
Last active August 29, 2015 14:10
Show Gist options
  • Save poying/51906f328131e3ac084d to your computer and use it in GitHub Desktop.
Save poying/51906f328131e3ac084d to your computer and use it in GitHub Desktop.
# 當前目錄位置
PREFIX = $(shell pwd)
WATCH = $(PREFIX)/bin/watch
watch: $(WATCH)
# 用 -s 來讓 make 安靜,不顯示 `make: Nothing to be done for `all'.` 這種訊息
$(WATCH) -i 300ms make -s
# 安裝 watch 指令
$(WATCH):
@-mkdir -p ./bin
@cd /tmp \
&& git clone https://github.com/tj/watch.git \
&& cd watch \
&& PREFIX=$(PREFIX) make install \
&& cd .. \
&& rm -rf watch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment