diff options
Diffstat (limited to 'subprojects/freeamo/src/main_functions')
-rw-r--r-- | subprojects/freeamo/src/main_functions | 13 |
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)" } |