2
0
Files
quantenzitrone ee5c7122c0 test-one-license: modernize bash script
this makes the script runnable on nixos and other distros that don't install bash in /bin
2025-10-15 18:03:39 +02:00

15 lines
458 B
Bash
Executable File

#!/usr/bin/env bash
#
# Usage:
# ./test-one-license <Short ID>
#
# any other command line arguments are ignored
TOOL_VERSION="$(awk '/^TOOL_VERSION/{print $NF}' Makefile)"
PUBLISHER=licenseListPublisher-${TOOL_VERSION}.jar
# if license list publisher is not present, download it
test ! -f "${PUBLISHER}" && make "${PUBLISHER}-valid"
java -jar "${PUBLISHER}" TestLicenseXML "src/${1}.xml" "test/simpleTestForGenerator/${1}.txt" "test/fullTestForGenerator"