aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--subprojects/freeamo/src/get-licenses2
-rw-r--r--subprojects/freeamo/src/main_functions13
-rw-r--r--subprojects/freeamo/src/make-wiki4
3 files changed, 10 insertions, 9 deletions
diff --git a/subprojects/freeamo/src/get-licenses b/subprojects/freeamo/src/get-licenses
index 610d614..be814f4 100644
--- a/subprojects/freeamo/src/get-licenses
+++ b/subprojects/freeamo/src/get-licenses
@@ -101,7 +101,7 @@ function get-licenses--filter {
amo_variables
amo_variables__licenses
- # license="$(jq ".license.name" "$run_path/build/json/current_versions/$current_version__id.json" | sed "s|en-US|enUS|;" | jq .enUS | sed "s|^\"||; s|\"$||;")"
+ # license="$(jq ".license.name" "$run_path/build/json/current_versions/$current_version__id.json" | sed "s|en-US|enUS|;" | jq -r .enUS )"
# echo "$run_path/build/json/current_versions/$(jq ".results[$entry].current_version.id" "$file")"
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)"
}
diff --git a/subprojects/freeamo/src/make-wiki b/subprojects/freeamo/src/make-wiki
index a148e74..b4de1a6 100644
--- a/subprojects/freeamo/src/make-wiki
+++ b/subprojects/freeamo/src/make-wiki
@@ -83,8 +83,8 @@ while IFS= read -r table; do
# End description code
# The homepage field is mandatory so let's remove "null" from it because we don't need to evaluat it
- homepage_url=$(jq .results[$entry].homepage "$file" | sed "s|en-US|enUS|;" | jq .enUS | sed "s|^\"||; s|\"$||;" | sed "s|null||");
- license_copyright=$(jq .results[$entry].authors[].name "$file" | sed "s|^\"||; s|\"$||;");
+ homepage_url=$(jq .results[$entry].homepage "$file" | sed "s|en-US|enUS|;" | jq -r .enUS | sed "s|null||");
+ license_copyright=$(jq -r .results[$entry].authors[].name "$file" );
bayesian_average=$(jq .results[$entry].ratings.bayesian_average "$file");
bayesian_average__simple=$(printf "%.1f" "${bayesian_average//./,}");