Skip to content
This repository was archived by the owner on Dec 27, 2019. It is now read-only.

Commit ec7d1db

Browse files
author
MegaXLR
committed
Add makefile.
run make; sudo make install Signed-off-by: MegaXLR <[email protected]>
1 parent f41cf6c commit ec7d1db

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
hosts
2+
hostfile
3+
.temp

makefile

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
default: clean
2+
echo "##COINHIVE DOMAINS">>hostfile;
3+
sed 's/^/127\.0\.0\.1 /' domains >> hostfile
4+
echo "##END COINHIVE">>hostfile;
5+
install:
6+
cp /etc/hosts hosts;
7+
-rm .temp
8+
sed '/##COINHIVE DOMAINS/,/##END COINHIVE/d' hosts >> .temp
9+
cat hostfile >> .temp
10+
mv .temp hosts
11+
cp hosts /etc/hosts
12+
clean:
13+
if test -s "hostfile" ; \
14+
then \
15+
rm hostfile ;\
16+
fi
17+
if test -s "hosts" ; \
18+
then \
19+
rm hosts ;\
20+
fi
21+
if test -s ".temp" ; \
22+
then \
23+
rm .temp ;\
24+
fi

0 commit comments

Comments
 (0)