electrum-build/update-electrum.sh
Steven Polley e0198663fd
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/promote/updateelectrum Build is failing
Update update-electrum.sh
2024-01-21 01:26:17 +00:00

36 lines
911 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"
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 ""