From f30e5e11a91d5880d5e3a0eedbeca2615e7fb285 Mon Sep 17 00:00:00 2001 From: Ben Grande Date: Mon, 8 Jul 2024 18:08:27 +0200 Subject: [PATCH] build: dictionary sort licenses names GHA can sort differently than local. --- scripts/spec-get.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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