From b6340a126fc8c2c0a2071839fdf20fbb7ba08cfe Mon Sep 17 00:00:00 2001 From: Cameron Ball Date: Tue, 14 Apr 2015 23:42:38 +0800 Subject: [PATCH] Quick and dirty script to build files for USB update. --- .gitignore | 2 ++ make-dist.sh | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 make-dist.sh diff --git a/.gitignore b/.gitignore index 14a8b53..4767e77 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ hdmi-switcher video.mp4 config.ini +dist/ +private.pem diff --git a/make-dist.sh b/make-dist.sh new file mode 100644 index 0000000..698ae32 --- /dev/null +++ b/make-dist.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +mkdir -p tmp/hdmi-switcher +mkdir dist +make +cp hdmi-switcher tmp/hdmi-switcher +cp start.sh tmp/hdmi-switcher +cp update.sh tmp/hdmi-switcher +cd tmp +zip -r update hdmi-switcher +cd ../ +mv tmp/update.zip dist +rm -rf tmp + +if [ -f "private.pem" ] +then + openssl dgst -sha256 -sign private.pem -out dist/update.sig dist/update.zip +else + echo "Warning: Unable to sign file. Private key not found." +fi \ No newline at end of file -- 2.11.0