Don't require festival during signing. (#6079)

Festival isn't available via Homebrew and is only needed to read the hash
aloud, so let's not make it a strict requirement that it's installed. You can
simply read the hash from the terminal instead.
This commit is contained in:
Brad Warren
2018-06-07 11:43:45 +03:00
committed by Joona Hoikkala
parent da6320f4d1
commit 780a1b3a26
+9 -9
View File
@@ -2,17 +2,17 @@
set -o errexit
if ! `which festival > /dev/null` ; then
echo Please install \'festival\'!
exit 1
fi
function sayhash { # $1 <-- HASH ; $2 <---SIGFILEBALL
while read -p "Press Enter to read the hash aloud or type 'done': " INP && [ "$INP" = "" ] ; do
cat $1 | (echo "(Parameter.set 'Duration_Stretch 1.8)"; \
echo -n '(SayText "'; \
sha256sum | cut -c1-64 | fold -1 | sed 's/^a$/alpha/; s/^b$/bravo/; s/^c$/charlie/; s/^d$/delta/; s/^e$/echo/; s/^f$/foxtrot/'; \
echo '")' ) | festival
if ! `which festival > /dev/null` ; then
echo \`festival\` is not installed!
echo Please install it to read the hash aloud
else
cat $1 | (echo "(Parameter.set 'Duration_Stretch 1.8)"; \
echo -n '(SayText "'; \
sha256sum | cut -c1-64 | fold -1 | sed 's/^a$/alpha/; s/^b$/bravo/; s/^c$/charlie/; s/^d$/delta/; s/^e$/echo/; s/^f$/foxtrot/'; \
echo '")' ) | festival
fi
done
echo 'Paste in the data from the QR code, then type Ctrl-D:'