698ae32c7c2dd52578181f0fc7aac3a6a8b80b60
[hdmi-switcher.git] / make-dist.sh
1 #!/bin/bash
2
3 mkdir -p tmp/hdmi-switcher
4 mkdir dist
5 make
6 cp hdmi-switcher tmp/hdmi-switcher
7 cp start.sh tmp/hdmi-switcher
8 cp update.sh tmp/hdmi-switcher
9 cd tmp
10 zip -r update hdmi-switcher
11 cd ../
12 mv tmp/update.zip dist
13 rm -rf tmp
14
15 if [ -f "private.pem" ]
16 then
17 openssl dgst -sha256 -sign private.pem -out dist/update.sig dist/update.zip
18 else
19 echo "Warning: Unable to sign file. Private key not found."
20 fi