electrum-build/update-electrum.sh
Steven Polley 9140ee846c
All checks were successful
continuous-integration/drone Build is passing
add update electrum script
2023-11-14 17:16:04 -07:00

36 lines
922 B
Bash

#!/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 ""