electrum-build/update-electrum.sh

40 lines
957 B
Bash
Raw Permalink Normal View History

2023-11-15 00:16:04 +00:00
#!/bin/bash
if [[ -z "${APKURL}" ]]; then
echo "APKURL environment variable must be defined. It should be set to the URL to download the Electrum APK"
exit 1
fi
APKNAME=$(basename $APKURL)
echo "Downloading ${APKURL}"
2024-01-21 01:29:21 +00:00
curl -O -J "${APKURL}"
echo "Downloading ${APKURL}.asc"
2023-11-15 00:16:04 +00:00
curl -O -J "${APKURL}.asc"
2024-01-21 01:29:21 +00:00
ls -la
2024-01-21 01:26:17 +00:00
gpg --verify "${APKNAME}.asc"
2023-11-15 00:16:04 +00:00
if [ $? -ne 0 ] ; then
echo "gpg signatures failed! Something fishy/malicious is probably going on with this electrum apk. Cleaning up tainted files. Please check manually and investigate!"
rm -rf $APKNAME "${APKNAME}.asc"
exit 2
fi
mv $APKNAME /apps
echo ""
echo ""
echo "Connect the phone, ensure USB debugging is enabled, then run these commands on the host: "
echo ""
echo ""
echo " sudo adb kill-server"
echo " sudo adb start-server"
echo ""
echo " sudo adb install /data/android/apps/${APKNAME}"
echo ""
echo " sudo adb kill-server"
echo ""
echo ""