Skip to content

Offline gym log for Android. No account, no ads, no internet.

fix(wearos): add missing file extension for adb

Andrea170fbd0e7247
diff --git a/wear/install.sh b/wear/install.sh
index b569def..2516bb5 100644
--- a/wear/install.sh
+++ b/wear/install.sh
@@ -102,10 +102,11 @@ else
case "$a" in arm64-v8a|armeabi-v7a|x86_64) abi=$a; break ;; esac
done
[ -n "$abi" ] || fail "This watch reports $abis, and there is no GymMane APK for it."
- TMPAPK=$(mktemp)
+ TMPDIR_APK=$(mktemp -d)
+ TMPAPK="$TMPDIR_APK/GymMane-$abi.apk"
say "Downloading GymMane for $abi from the latest release..."
fetch "https://github.com/$REPO/releases/latest/download/GymMane-$abi.apk" "$TMPAPK" ||
- { rm -f "$TMPAPK"; fail 'Could not download the APK. Check the connection and try again.'; }
+ { rm -rf "$TMPDIR_APK"; fail 'Could not download the APK. Check the connection and try again.'; }
FILE=$TMPAPK
ok "GymMane-$abi.apk"
fi
@@ -113,7 +114,7 @@ fi
step 4 Install
r=$("$ADB" -s "$WATCH" install -r "$FILE" 2>&1 || true)
-[ -z "$TMPAPK" ] || rm -f "$TMPAPK"
+[ -z "$TMPAPK" ] || rm -rf "$TMPDIR_APK"
case "$r" in
*Success*) ok 'GymMane is on the watch' ;;
*VERSION_DOWNGRADE*) fail 'The watch already has a newer GymMane than this one. Nothing to do.' ;;