electrum-build/update-electrum.sh

36 lines
922 B
Bash
Raw 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}"
curl -O -J $APKURL
curl -O -J "${APKURL}.asc"
gpg --verify "${APKNAME}.asc" >/dev/null
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 ""