aboutsummaryrefslogtreecommitdiff
path: root/subprojects/freeamo/src/get-licenses
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/freeamo/src/get-licenses')
-rw-r--r--subprojects/freeamo/src/get-licenses21
1 files changed, 9 insertions, 12 deletions
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
}