From dd648954e1320e78dcdf50c94702d2a8fd9a13a2 Mon Sep 17 00:00:00 2001 From: Christopher Tubbs Date: Nov 18 2022 16:51:50 +0000 Subject: Cleanup output from download-all-fedora-licenses Update download-all-fedora-licenses script to: * remove leading and trailing whitespace from output * sort licenses in output * fix multiline heredoc using cat instead of echo, which doesn't read from stdin --- diff --git a/download-all-fedora-licenses b/download-all-fedora-licenses index f8f84e5..77ee9a2 100755 --- a/download-all-fedora-licenses +++ b/download-all-fedora-licenses @@ -3,9 +3,9 @@ curl https://src.fedoraproject.org/lookaside/rpm-specs-latest.tar.xz > rpm-specs-latest.tar.xz tar axf rpm-specs-latest.tar.xz grep '^License:' rpm-specs/*spec | cut '-d:' -f1,3- > package-license.txt -cut '-d:' -f2 < package-license.txt > license.txt +cut '-d:' -f2 < package-license.txt | awk '{$1=$1;print}' | sort -u > license.txt -echo <