33
1
mirror of https://github.com/vdm-io/JCB-Packages.git synced 2024-11-27 07:16:35 +00:00

added checksum for each package in repository, with the bash script that builds it.

This commit is contained in:
Llewellyn van der Merwe 2018-03-24 00:53:16 +02:00
parent 5e399a9100
commit 630403252d
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
14 changed files with 62 additions and 0 deletions

View File

@ -0,0 +1 @@
0f818dd501ca63845786082271bac60fedc2cabf

1
JCB_demo.sha Normal file
View File

@ -0,0 +1 @@
2827088e3e54b32a9195dc452da4dc2d297b7e2f

1
JCB_demoAdvanced.sha Normal file
View File

@ -0,0 +1 @@
4ae5ea26b2ef921326dc0d2e47ea0a2796b6113e

1
JCB_documentManager.sha Normal file
View File

@ -0,0 +1 @@
94dc4051feb5bbd314bb2ff403540a844895d3fd

1
JCB_expertDatabase.sha Normal file
View File

@ -0,0 +1 @@
4177022b89e513eac425087654d45070c350bd68

View File

@ -0,0 +1 @@
041ea00eb814f1ac08f12e4602ba8ef0d83e513b

1
JCB_helloWorld.sha Normal file
View File

@ -0,0 +1 @@
f291cd7236544bb837ee710eeb12ae6a4f0ebdc3

View File

@ -0,0 +1 @@
0c2a308c7dd2c06f19d42e1c05acad1175e19c3b

1
JCB_locationData.sha Normal file
View File

@ -0,0 +1 @@
5876af82f90a85da3d8e2e3e6dbe0c1a845fd0a6

View File

@ -0,0 +1 @@
b91cf8385f9b728084252c015329a49bd464b5ad

View File

@ -0,0 +1 @@
21b2257c5b6399a118cd7089509c1fb137c0abcd

1
JCB_supportGroups.sha Normal file
View File

@ -0,0 +1 @@
294ecf967dc7058e98b7d8517b6733d5b8a1eb0b

14
checksum.json Normal file
View File

@ -0,0 +1,14 @@
{
"JCB_componentBuilderPublic.zip": "0f818dd501ca63845786082271bac60fedc2cabf",
"JCB_demoAdvanced.zip": "4ae5ea26b2ef921326dc0d2e47ea0a2796b6113e",
"JCB_demo.zip": "2827088e3e54b32a9195dc452da4dc2d297b7e2f",
"JCB_documentManager.zip": "94dc4051feb5bbd314bb2ff403540a844895d3fd",
"JCB_expertDatabase.zip": "4177022b89e513eac425087654d45070c350bd68",
"JCB_googlePlusProfileFeed.zip": "041ea00eb814f1ac08f12e4602ba8ef0d83e513b",
"JCB_helloWorld.zip": "f291cd7236544bb837ee710eeb12ae6a4f0ebdc3",
"JCB_jobTrackingSystem.zip": "0c2a308c7dd2c06f19d42e1c05acad1175e19c3b",
"JCB_locationData.zip": "5876af82f90a85da3d8e2e3e6dbe0c1a845fd0a6",
"JCB_questionsAndAnswers.zip": "b91cf8385f9b728084252c015329a49bd464b5ad",
"JCB_sermondistributor.zip": "21b2257c5b6399a118cd7089509c1fb137c0abcd",
"JCB_supportGroups.zip": "294ecf967dc7058e98b7d8517b6733d5b8a1eb0b"
}

36
hash.sh Executable file
View File

@ -0,0 +1,36 @@
#! /bin/bash
# Do some prep work
command -v jq >/dev/null 2>&1 || { echo >&2 "We require jq for this script to run, but it's not installed. Aborting."; exit 1; }
command -v sha1sum >/dev/null 2>&1 || { echo >&2 "We require sha1sum for this script to run, but it's not installed. Aborting."; exit 1; }
# quick checksum generator for all the Bibles used in getBible.net
echo -n "[vdm.io] -- Building checksum for all JCB (zip) Packages found in this repository......"
# setup: positional arguments to pass in literal variables, query with code
jq_args=( )
jq_query='.'
# counter
nr=1
for filename in *.zip; do
# get the hash
fileHash=$(sha1sum "$filename" | awk '{print $1}')
# build the hash file name
hashFilenName="${filename/.zip/.sha}"
# create/update the file checksum
echo "$fileHash" > "$hashFilenName"
# load the values for json
jq_args+=( --arg "key$nr" "$filename" )
jq_args+=( --arg "value$nr" "$fileHash" )
# build query for jq
jq_query+=" | .[\$key${nr}]=\$value${nr}"
#next
nr=$((nr+1))
done
# run the generated command with jq
jq "${jq_args[@]}" "$jq_query" <<<'{}' > checksum.json
# done with hash
echo "done"