From 143302c61413dc7fc43cd9d186f756a90ecf58df Mon Sep 17 00:00:00 2001 From: buildmaster Date: Wed, 31 Oct 2018 11:14:41 +0100 Subject: [PATCH] Add tool to create package hash. This program must be started by the package name, and reads the files VERSION and FULLNAMES --- create_hash.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 create_hash.sh diff --git a/create_hash.sh b/create_hash.sh new file mode 100755 index 0000000..40925d7 --- /dev/null +++ b/create_hash.sh @@ -0,0 +1,12 @@ +PACKAGE=$1 +VERSION=$( cat VERSION ) + +HASH='{"name":"'${PACKAGE}'","manually":false,"description":"'${PACKAGE}'","softwareVersions":[{"version":"'${VERSION}'"}],"softwareFullNames":[' +IFS=$'\n' +for name in $( cat FULLNAMES ) +do + HASH=${HASH}'{"name":"'${name}'"},' +done +HASH=$( echo $HASH | sed s/,$// ) +echo ${HASH}']}' + -- 2.43.0