summaryrefslogtreecommitdiff
path: root/bin/update_hosts
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2021-06-13 14:49:53 +0200
committerMarc Vertes <mvertes@free.fr>2021-06-13 14:49:53 +0200
commit2621ec5405f52343cf253d02e307c5b160cf7f04 (patch)
tree6321b8ea455258dbd9871c7fcc91205511c32beb /bin/update_hosts
parent445652e876c99ea24f7211f356c2a3d2c41d5d09 (diff)
update
Diffstat (limited to 'bin/update_hosts')
-rwxr-xr-xbin/update_hosts8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/update_hosts b/bin/update_hosts
index e7321bf..8550ec3 100755
--- a/bin/update_hosts
+++ b/bin/update_hosts
@@ -13,11 +13,11 @@ echo "last local update: $(date -r /etc/hosts)"
cd /etc
cp -p hosts hosts.old
-hosts=$(awk '/^# Custom host /, /^# End of custom host /' hosts.old)
+hosts=$(awk '/^# Custom host/, /^# End of custom host/' hosts.old)
curl -s 'https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts' | awk '
- BEGIN { hosts = ARGV[1]; ARGV[1] = "" }
- /^# Custom host / { print hosts; next }
- /^# End of custom host / { next }
+ BEGIN { hosts = ARGV[1]; ARGV[1] = "" }
+ /^# Custom host/ { print hosts; next }
+ /^# End of custom host/ { next }
{ print }
' "$hosts" > hosts.new