-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
31 lines (27 loc) · 947 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
help:
@echo "use: $(MAKE) [clone-upstream]"
@echo ""
@echo " clone-upstream -> clone upstream(Jigsaw-Code/outline-server) into ./workspace/outline-server"
@echo " apply-patches -> patch diff files into ./workspace/outline-server"
@echo " create-patch -> create patch file from workspace TARGET=target_to_execute_diff"
@echo " clean -> clean workspace directory"
clone-upstream:
mkdir -p ./workspace;
@if [[ ! -d ./workspace/outline-server ]]; then \
git clone https://github.com/Jigsaw-Code/outline-server.git ./workspace/outline-server; \
else \
cd ./workspace/outline-server; \
git pull; \
fi;
apply-patches:
@cd ./workspace/outline-server; \
for FILE in ../../patches/*.patch; do \
[[ -e "$${FILE}" ]] || continue; \
echo "Applying $${FILE}"; \
git apply "$${FILE}"; \
done;
create-patch:
@cd ./workspace/outline-server; \
git diff $(TARGET) > ../../patches/_.patch;
clean:
rm -rf ./workspace/outline-server;