From 28ddaee9d949f3cc50b1df108f05fa55f7f40182 Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Mon, 4 May 2020 12:06:06 +0200 Subject: [PATCH] Make rushlink script more portable. It didn't work on mac (and bsd, probably). Now it does. --- contrib/rushlink | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/rushlink b/contrib/rushlink index b476b18..895a575 100755 --- a/contrib/rushlink +++ b/contrib/rushlink @@ -13,7 +13,7 @@ link() { *) curl -sS -Ffile=@- "$LINK" < "$1" ;; - esac | sed -n '1p;/deleteToken/{s@.*\(https://\)@\1@;p;q}' | ( + esac | awk 'NR == 1 { print } $NF ~ /deleteToken=/ { print $NF; exit }' | ( IFS= read -r link IFS= read -r deletelink echo "$link"