annotate ui/tests/append-sig.sh @ 1368:41cf49df007d

(issue179) Add signature timestamp in linux installer packages
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 24 Nov 2014 14:04:34 +0100
parents 8c829345ecfa
children 289cb3554c55
rev   line source
768
3f290ea49d45 Add helper script for signature creation to avoid cmake escaping hell
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
1 #!/bin/bash
1366
8c829345ecfa (issue179) Write signature date in linux installer and add to test script
Andre Heinecke <andre.heinecke@intevation.de>
parents: 774
diff changeset
2 cp "$2" "$3"
8c829345ecfa (issue179) Write signature date in linux installer and add to test script
Andre Heinecke <andre.heinecke@intevation.de>
parents: 774
diff changeset
3 CUR_DT=$(date +%s)
8c829345ecfa (issue179) Write signature date in linux installer and add to test script
Andre Heinecke <andre.heinecke@intevation.de>
parents: 774
diff changeset
4 sed -i "s/###SIGNATURE_DATE###/${CUR_DT}/" "$3"
8c829345ecfa (issue179) Write signature date in linux installer and add to test script
Andre Heinecke <andre.heinecke@intevation.de>
parents: 774
diff changeset
5 echo -e \\r\\nS_DT:$CUR_DT >> "$3"
8c829345ecfa (issue179) Write signature date in linux installer and add to test script
Andre Heinecke <andre.heinecke@intevation.de>
parents: 774
diff changeset
6 echo -e \\r\\nS:$(openssl dgst -sha256 -sign "$1" < "$2" | base64 -w0) >> "$3"

http://wald.intevation.org/projects/trustbridge/