aboutsummaryrefslogtreecommitdiff
path: root/subprojects/freeamo/src/main_functions
diff options
context:
space:
mode:
authorIan Kelling <iank@fsf.org>2018-07-25 21:53:30 -0400
committerIan Kelling <iank@fsf.org>2018-07-25 21:53:30 -0400
commit2ed42019b366f3cd6ab8f5bd6c234a19c1ef0629 (patch)
tree2a11a062a8208d6bdc46cb85b9f82152234a5105 /subprojects/freeamo/src/main_functions
parentcac3d5c10aa9123b968c503d5ae2f75b5d4eac9c (diff)
fix 141 broken pipe error
The error could be ignored in this case but better to just remove quotes properly and avoid it.
Diffstat (limited to 'subprojects/freeamo/src/main_functions')
-rw-r--r--subprojects/freeamo/src/main_functions13
1 files changed, 7 insertions, 6 deletions
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)"
}