From f363073c84e35e8f1b6fb3d83ab727f2d2526978 Mon Sep 17 00:00:00 2001 From: zokradonh Date: Wed, 12 Jun 2019 13:17:18 +0200 Subject: [PATCH] Use jq's -r switch instead of sed Use jq's -r switch instead of sed to remove double-quotes. --- base/create-kopano-repo.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/create-kopano-repo.sh b/base/create-kopano-repo.sh index 15b8edf..8191401 100755 --- a/base/create-kopano-repo.sh +++ b/base/create-kopano-repo.sh @@ -14,8 +14,8 @@ function h5ai_query { distribution=${2:-Debian_9.0} filename=$(curl -s -S -L -d "action=get&items%5Bhref%5D=%2Fcommunity%2F$component%3A%2F&items%5Bwhat%5D=1" -H \ - "Accept: application/json" https://download.kopano.io/community/ | jq '.items[].href' | \ - grep "$distribution-all\|$distribution-amd64" | sed 's#"##g' | sed "s#/community/$component:/##") + "Accept: application/json" https://download.kopano.io/community/ | jq -r '.items[].href' | \ + grep "$distribution-all\|$distribution-amd64" | sed "s#/community/$component:/##") if [ -z "${filename// }" ]; then echo "unknown component"