From 29b7728d89b8c64220ffd06e268fdaa35dac7f45 Mon Sep 17 00:00:00 2001 From: david Date: Fri, 20 Jul 2018 12:45:24 +0200 Subject: FreeAMO. General bug fixes. Fixed the description fields for .wiki pages --- subprojects/freeamo/src/get-licenses | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'subprojects/freeamo/src/get-licenses') diff --git a/subprojects/freeamo/src/get-licenses b/subprojects/freeamo/src/get-licenses index c7e5559..79b6da4 100644 --- a/subprojects/freeamo/src/get-licenses +++ b/subprojects/freeamo/src/get-licenses @@ -18,12 +18,11 @@ # API: Please adopt SPDX - https://github.com/mozilla/addons-server/issues/8706 # Allow GNU [L]GPL x.x or later - https://github.com/mozilla/addons-server/issues/8707 -cd "build/json/search-pages" +cd "build/json/search-pages" || exit function get-licenses--download { - echo -e "\\nDownloading license pages:" - + # API: Add "last_license" to the search pages - https://github.com/mozilla/addons-server/issues/8945 output_file="$output_file_1"; pv__size="$(wc -l < "$output_file")" @@ -35,8 +34,8 @@ function get-licenses--download { if [ "$debug" = true ] && [ "$line" -le "3" ] || [ "$debug" = false ] ; then - file=$(echo $table | awk '{print $1}'); - entry=$(echo $table | awk '{print $2}'); + file=$(echo "$table" | awk '{print $1}'); + entry=$(echo "$table" | awk '{print $2}'); source "$run_path/src/main_functions" amo_variables @@ -52,14 +51,12 @@ function get-licenses--download { echo "foo" # Must be here to work with pv - done < "$output_file_1" | progress + done < "$output_file_1" | pv__progress } function get-licenses--filter { - echo -e "\\nFilter license pages:" - output_file="$output_file_1"; pv__size="$(wc -l < "$output_file")" source "$run_path/src/main_functions" @@ -72,8 +69,8 @@ function get-licenses--filter { if [ "$debug" = true ] && [ "$line" -le "3" ] || [ "$debug" = false ] ; then - file=$(echo $table | awk '{print $1}'); - entry=$(echo $table | awk '{print $2}'); + file=$(echo "$table" | awk '{print $1}'); + entry=$(echo "$table" | awk '{print $2}'); source "$run_path/src/main_functions" amo_variables @@ -101,7 +98,7 @@ function get-licenses--filter { # The nonfree add-ons should not be removed since the line number must correspond with the entry number in the search result JSON files. # echo "$name: $license__amo_full_name" - echo "$file $entry" >> "$output_file_2" + echo "$file $entry $slug" >> "$output_file_2" freedom_status="free"; @@ -120,6 +117,6 @@ function get-licenses--filter { echo "foo" # Must be here to work with pv - done < "$output_file_1" | progress + done < "$output_file_1" | pv__progress } -- cgit v1.2.3