From 2ed42019b366f3cd6ab8f5bd6c234a19c1ef0629 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Wed, 25 Jul 2018 21:53:30 -0400 Subject: fix 141 broken pipe error The error could be ignored in this case but better to just remove quotes properly and avoid it. --- subprojects/freeamo/src/main_functions | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'subprojects/freeamo/src/main_functions') diff --git a/subprojects/freeamo/src/main_functions b/subprojects/freeamo/src/main_functions index e154a6e..ad7c435 100644 --- a/subprojects/freeamo/src/main_functions +++ b/subprojects/freeamo/src/main_functions @@ -65,10 +65,11 @@ function do-locale { echo "####################" - tmp__enUS=$(jq ".results[$entry].$locale_description" "$file" | sed "s|-||;" | jq .enUS | sed 's|^"||; s|"$||;' ) - tmp__enGB=$(jq ".results[$entry].$locale_description" "$file" | sed "s|-||;" | jq .enGB | sed 's|^"||; s|"$||;' ) - - tmp=$(jq ".results[$entry].$locale_description[]" "$file" | head -n 1 | sed "s|^\"||; s|\"$||;"); # Use the first avalible if English is not avaliable + tmp__enUS=$(jq ".results[$entry].$locale_description" "$file" | sed "s|-||;" | jq -r .enUS ) + tmp__enGB=$(jq ".results[$entry].$locale_description" "$file" | sed "s|-||;" | jq -r .enGB ) + + # Use the first avalible if English is not avaliable + tmp=$(jq -r ".results[$entry].$locale_description[]" "$file" | head -n 1) # David will work on this later # if [ "$tmp" == "" ]; then @@ -141,7 +142,7 @@ function amo_variables() { id="$(jq ".results[$entry].id" "$file")"; average_daily_users="$(jq ".results[$entry].average_daily_users" "$file")"; has_eula="$(jq ".results[$entry].has_eula" "$file")"; - slug="$(jq ".results[$entry].slug" "$file" | sed "s|^\"||; s|\"$||;")"; + slug="$(jq -r ".results[$entry].slug" "$file")"; current_version__id=$(jq ".results[$entry].current_version.id" "$file"); source "$run_path/src/main_functions" @@ -162,7 +163,7 @@ function amo_variables() { function amo_variables__licenses { - license__amo_full_name="$(jq ".license.name" "$run_path/build/json/current_versions/$current_version__id.json" | sed "s|en-US|enUS|;" | jq .enUS | sed "s|^\"||; s|\"$||;")" + license__amo_full_name="$(jq ".license.name" "$run_path/build/json/current_versions/$current_version__id.json" | sed "s|en-US|enUS|;" | jq -r .enUS)" } -- cgit v1.2.3