1
0
mirror of https://github.com/Adorable-Catgirl/Zorya-NEO.git synced 2024-11-27 12:48:07 +11:00
Zorya-NEO/utils/sign.sh

16 lines
489 B
Bash
Raw Normal View History

#!/bin/bash
for f in src/modules/*; do
if [[ -f "$f/init.lua" ]]; then
echo "Siging $f."
printf "init.lua\x00" > ".tmp_1"
openssl dgst -sha256 -sign zbsign.pem "$f/init.lua" > ".tmp_2"
printf "manifest.ini\x00" > ".tmp_3"
openssl dgst -sha256 -sign zbsign.pem "$f/manifest.ini" > ".tmp_4"
if [[ -f "$f/lang.xml" ]]; then
printf "lang.xml\x00" > ".tmp_5"
openssl dgst -sha256 -sign zbsign.pem "$f/lang.xml" > ".tmp_6"
fi
cat .tmp_* > "$f/sig.bin"
rm .tmp_*
fi
done