#!/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}" echo "Downloading ${APKURL}.asc" curl -O -J "${APKURL}.asc" ls -la 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 ""