From: buildmaster Date: Wed, 31 Oct 2018 10:14:41 +0000 (+0100) Subject: Add tool to create package hash. X-Git-Url: https://repo.cephalix.eu/gitweb/?a=commitdiff_plain;h=143302c61413dc7fc43cd9d186f756a90ecf58df;p=oss-pkg-tools.git Add tool to create package hash. This program must be started by the package name, and reads the files VERSION and FULLNAMES --- 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}']}' +