From 8b1827f42d3d8a967b9a385bbb048835e1792872 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 12 Oct 2011 13:00:44 +0200 Subject: //retiolum super-...: inline hrefs --- retiolum/bin/supernode-update-hosts-and-hup | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'retiolum/bin') diff --git a/retiolum/bin/supernode-update-hosts-and-hup b/retiolum/bin/supernode-update-hosts-and-hup index b1ce3489..221a7538 100755 --- a/retiolum/bin/supernode-update-hosts-and-hup +++ b/retiolum/bin/supernode-update-hosts-and-hup @@ -3,16 +3,18 @@ set -euf cd /etc/tinc/retiolum/hosts -painload="$(dirname "$(readlink -f "$0")")/../.." - temp1="`mktemp`" temp2="`mktemp`" trap "rm -f $temp1 $temp2" EXIT INT TERM old_commit="`cat .commit 2>/dev/null || :`" +_hrefs() { + sed -n 's/href="\([^"]\+\)"/\n&\n/gp' | + sed -n 's/^href="\([^"]\+\)"$/\1/p'; } + curl -fsS "https://github.com/krebscode/painload/tree/master/retiolum/hosts" | - "$painload/util/bin/hrefs" | + _hrefs | grep '^/krebscode/painload/blob/' | grep -v "/blob/$old_commit/" >$temp1 -- cgit v1.2.3