diff --git a/scripts/spec-get.sh b/scripts/spec-get.sh index ae64106..337e8d0 100755 --- a/scripts/spec-get.sh +++ b/scripts/spec-get.sh @@ -88,7 +88,8 @@ fi if test "${key}" = "license" || test "${key}" = "license_csv"; then license_csv="$(reuse --root "${project_dir}" lint | - awk -F ':' '/^* Used licenses:/{print $2}' | tr -d " ")" + awk -F ':' '/^\* Used licenses:/{print $2}' | tr " " "\n" | sort -d | + tr -s "\n" " " | tr -d " ")" license="$(echo "${license_csv}" | sed "s/,/ AND /g")" fi