aboutsummaryrefslogtreecommitdiff
path: root/subprojects/freeamo/src
diff options
context:
space:
mode:
authordavid <public@beloved.name>2018-08-08 20:44:07 +0200
committerdavid <public@beloved.name>2018-08-08 20:44:07 +0200
commitd8070e699d70268ef9eb86c06e33c6e5912827dd (patch)
tree41d15cade205010b0817375ddaf777cd49087d1b /subprojects/freeamo/src
parent08071bef74544b0e4905d509b94a12e64dd3811b (diff)
FreeAMO: Added SPDX license identifiers
Diffstat (limited to 'subprojects/freeamo/src')
-rw-r--r--subprojects/freeamo/src/main_functions1
-rw-r--r--subprojects/freeamo/src/make-wiki20
2 files changed, 10 insertions, 11 deletions
diff --git a/subprojects/freeamo/src/main_functions b/subprojects/freeamo/src/main_functions
index 8e4907a..daa779f 100644
--- a/subprojects/freeamo/src/main_functions
+++ b/subprojects/freeamo/src/main_functions
@@ -69,7 +69,6 @@ function do-locale {
tmp__en_GB=$(jq ".results[$entry].$locale_description" "$file" | sed "s|en-GB|en_GB|" | jq -r .en_GB )
# Use the first avalible if English is not avaliable
tmp=$(jq -r ".results[$entry] | select(.$locale_description != null) | .$locale_description[]" "$file" | head -n 1) || [[ $? == 141 ]] # Avoid `head -n 1` error `returned 141`
-
if [ "$tmp__en_US" != "null" ]; then
diff --git a/subprojects/freeamo/src/make-wiki b/subprojects/freeamo/src/make-wiki
index e679bf7..8e85c51 100644
--- a/subprojects/freeamo/src/make-wiki
+++ b/subprojects/freeamo/src/make-wiki
@@ -60,14 +60,14 @@ while IFS= read -r table; do
amo_variables
amo_variables__licenses
- if [ "$license__amo_full_name" == "BSD License" ]; then license__fsd_short_name="BSD 2Clause";
- elif [ "$license__amo_full_name" == "GNU General Public License, version 3.0" ]; then license__fsd_short_name="GPLv3";
- elif [ "$license__amo_full_name" == "GNU General Public License, version 2.0" ]; then license__fsd_short_name="GPLv2";
- elif [ "$license__amo_full_name" == "GNU Lesser General Public License, version 3.0" ]; then license__fsd_short_name="LGPLv3";
- elif [ "$license__amo_full_name" == "GNU Lesser General Public License, version 2.1" ]; then license__fsd_short_name="LGPLv2.1";
- elif [ "$license__amo_full_name" == "MIT/X11 License" ]; then license__fsd_short_name="X11";
- elif [ "$license__amo_full_name" == "Mozilla Public License, version 2.0" ]; then license__fsd_short_name="MPLv2.0";
- elif [ "$license__amo_full_name" == "Mozilla Public License Version 1.1" ]; then license__fsd_short_name="MPLv1.1";
+ if [ "$license__amo_full_name" == "BSD License" ]; then license__spdx_short_identifier="BSD-2-Clause";
+ elif [ "$license__amo_full_name" == "GNU General Public License, version 3.0" ]; then license__spdx_short_identifier="GPL-3.0";
+ elif [ "$license__amo_full_name" == "GNU General Public License, version 2.0" ]; then license__spdx_short_identifier="GPL-2.0";
+ elif [ "$license__amo_full_name" == "GNU Lesser General Public License, version 3.0" ]; then license__spdx_short_identifier="LGPL-3.0";
+ elif [ "$license__amo_full_name" == "GNU Lesser General Public License, version 2.1" ]; then license__spdx_short_identifier="LGPL-2.1";
+ elif [ "$license__amo_full_name" == "MIT/X11 License" ]; then license__spdx_short_identifier="X11";
+ elif [ "$license__amo_full_name" == "Mozilla Public License, version 2.0" ]; then license__spdx_short_identifier="MPL-2.0";
+ elif [ "$license__amo_full_name" == "Mozilla Public License Version 1.1" ]; then license__spdx_short_identifier="MPL-1.1";
fi
# Start localization code
@@ -177,7 +177,7 @@ while IFS= read -r table; do
# https://addons.mozilla.org/api/v3/addons/addon/noscript/versions/1910123/
echo "{{Project license
-|License=$license__fsd_short_name
+|License=$license__spdx_short_identifier
|License copyright=$license_copyright
|License note=\"License: $license__amo_full_name\" listed
at https://addons.mozilla.org/en-US/firefox/addon/adblock-plus/
@@ -199,7 +199,7 @@ at https://addons.mozilla.org/en-US/firefox/addon/adblock-plus/
echo "|-
| [[$slug|$name]]
| $short_description
-| [[License:$license__fsd_short_name|$license__fsd_short_name]]
+| [[License:$license__spdx_short_identifier|$license__spdx_short_identifier]]
| $average_daily_users
| $bayesian_average__simple
| $last_updated