APKSIGNKEY="$(iniget "${CONFIG_INI:-config.ini}" "branch $branch" "apk_key")"
fi
+if [ -n "$APKSIGNKEY" ]; then
+ umask 077
+ echo "$APKSIGNKEY" > "$tmpdir/apk.pem"
+
+ umask 022
+ find "$tmpdir/tar/" -type f -name "packages.adb" -exec \
+ "${APK_BIN:-apk}" adbsign --allow-untrusted --sign-key "$(readlink -f "$tmpdir/apk.pem")" "{}" \; || finish 6
+fi
+
if echo "$GPGKEY" | grep -q "BEGIN PGP PRIVATE KEY BLOCK"; then
umask 077
echo "$GPGPASS" > "$tmpdir/gpg.pass"
signify-openbsd -S -s "$(readlink -f "$tmpdir/usign.sec")" -m "{}" \; || finish 5
fi
-if [ -n "$APKSIGNKEY" ]; then
- umask 077
- echo "$APKSIGNKEY" > "$tmpdir/apk.pem"
-
- umask 022
- find "$tmpdir/tar/" -type f -name "packages.adb" -exec \
- "${APK_BIN:-apk}" adbsign --allow-untrusted --sign-key "$(readlink -f "$tmpdir/apk.pem")" "{}" \; || finish 6
-fi
-
tar -C "$tmpdir/tar/" -czf "$tarball" . || finish 6
finish 0