This repository has been archived by the owner on Dec 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
run make; sudo make install Signed-off-by: MegaXLR <[email protected]>
- Loading branch information
MegaXLR
committed
Oct 4, 2017
1 parent
f41cf6c
commit ec7d1db
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
hosts | ||
hostfile | ||
.temp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |