]> repo.cephalix.eu Git - oss-pkg-tools.git/commitdiff
Add tool to create package hash.
authorbuildmaster <buildmaster@git.cephalix.eu>
Wed, 31 Oct 2018 10:14:41 +0000 (11:14 +0100)
committerbuildmaster <buildmaster@git.cephalix.eu>
Wed, 31 Oct 2018 10:14:41 +0000 (11:14 +0100)
This program must be started by the package name, and reads the files VERSION and FULLNAMES

create_hash.sh [new file with mode: 0755]

diff --git a/create_hash.sh b/create_hash.sh
new file mode 100755 (executable)
index 0000000..40925d7
--- /dev/null
@@ -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}']}'
+