Quick and dirty script to build files for USB update.
[hdmi-switcher.git] / make-dist.sh
diff --git a/make-dist.sh b/make-dist.sh
new file mode 100644 (file)
index 0000000..698ae32
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash\r
+\r
+mkdir -p tmp/hdmi-switcher\r
+mkdir dist\r
+make\r
+cp hdmi-switcher tmp/hdmi-switcher\r
+cp start.sh tmp/hdmi-switcher\r
+cp update.sh tmp/hdmi-switcher\r
+cd tmp\r
+zip -r update hdmi-switcher\r
+cd ../\r
+mv tmp/update.zip dist\r
+rm -rf tmp\r
+\r
+if [ -f "private.pem" ]\r
+then\r
+    openssl dgst -sha256 -sign private.pem -out dist/update.sig dist/update.zip\r
+else\r
+    echo "Warning: Unable to sign file. Private key not found."\r
+fi
\ No newline at end of file