From 2298cb0e5158fe0edc58afdb6a06c8b2d5ae4092 Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Mon, 6 Jun 2016 10:40:01 -0700 Subject: [PATCH] fix contrib/install.sh when using busybox awk ``` / # echo foobar | busybox awk '{print substr($0, 2, length-2)}' awk: cmd. line:1: Unexpected token / # echo foobar | busybox awk '{print substr($0, 2, length($0)-2)}' ooba / # echo foobar | gawk '{print substr($0, 2, length-2)}' ooba / # echo foobar | gawk '{print substr($0, 2, length($0)-2)}' ooba ``` --- contrib/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/install.sh b/contrib/install.sh index f6a7ccf..cb8a43b 100755 --- a/contrib/install.sh +++ b/contrib/install.sh @@ -20,7 +20,7 @@ for SRC in $ARGS; do # If there are surrounding quotes, remove them. We do this simply by knowing that the destination is always an absolute path if [ "$(echo $DESTFILE | head -c1)" != "/" ]; then - DESTFILE=$(echo $DESTFILE | awk '{print substr($0, 2, length-2)}') + DESTFILE=$(echo $DESTFILE | awk '{print substr($0, 2, length($0)-2)}') fi # Do the chmod dance, and ignore errors on platforms that don't like setting permissions of symlinks