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

Commit

Permalink
Add makefile.
Browse files Browse the repository at this point in the history
run make; sudo make install

Signed-off-by: MegaXLR <[email protected]>
  • Loading branch information
MegaXLR committed Oct 4, 2017
1 parent f41cf6c commit ec7d1db
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
hosts
hostfile
.temp
24 changes: 24 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
default: clean
echo "##COINHIVE DOMAINS">>hostfile;
sed 's/^/127\.0\.0\.1 /' domains >> hostfile
echo "##END COINHIVE">>hostfile;
install:
cp /etc/hosts hosts;
-rm .temp
sed '/##COINHIVE DOMAINS/,/##END COINHIVE/d' hosts >> .temp
cat hostfile >> .temp
mv .temp hosts
cp hosts /etc/hosts
clean:
if test -s "hostfile" ; \
then \
rm hostfile ;\
fi
if test -s "hosts" ; \
then \
rm hosts ;\
fi
if test -s ".temp" ; \
then \
rm .temp ;\
fi

0 comments on commit ec7d1db

Please sign in to comment.