Files
recurring-checklist/mobile/scripts/env.sh
T
Waters ChurchandClaude Opus 5 469db5bc60 Bring the checklist app under version control
The project has lived only as a folder on the Mac Studio and, briefly, as a
transfer tarball. This is the first commit: the Express server and its web
front end, the Capacitor iOS and Android wrappers, and the release and backup
scripts.

The repo is the source, not a backup of the machine. Left out on purpose, by
the .gitignore files that were already in the tree: node_modules, build output,
mobile/www (regenerated from server/public on every build), and server/data,
which holds the live checklists and belongs on the NAS rather than in git.

Every credential is excluded too — server/.env, the Play upload keystore and
its properties file, the App Store Connect key and ios-signing.config. The one
secret that was not in an ignored file was the NAS SSH password, hard-coded in
build-deploy.sh and grepped back out of it by backup-to-drive.sh. Both now read
it from the login keychain (service checklist-nas, account Christian), falling
back to NAS_PASS in the environment, so rotating it is one keychain entry
rather than a history rewrite.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-24 13:00:57 -04:00

27 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
# Toolchain paths for the Android build. Source it, don't run it: . scripts/env.sh
#
# This Mac has no Homebrew, no system Java and no Android Studio, so the Android toolchain
# was installed by hand into the user's home directory (see mobile/README.md → Toolchain).
# Nothing here is on the default PATH, which is why every Android command has to source
# this file first — including release.sh. Without it Gradle fails with the misleading
# "Unable to locate a Java Runtime".
export JAVA_HOME="$HOME/.jdks/temurin-21/Contents/Home"
export ANDROID_HOME="$HOME/Library/Android/sdk"
export ANDROID_SDK_ROOT="$ANDROID_HOME"
export PATH="$JAVA_HOME/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/emulator:$PATH"
if [ ! -x "$JAVA_HOME/bin/java" ]; then
echo "✗ No JDK at $JAVA_HOME" >&2
echo " Reinstall: curl -L -o /tmp/jdk.tar.gz 'https://api.adoptium.net/v3/binary/latest/21/ga/mac/aarch64/jdk/hotspot/normal/eclipse'" >&2
echo " mkdir -p ~/.jdks && tar -xzf /tmp/jdk.tar.gz -C ~/.jdks && mv ~/.jdks/jdk-21* ~/.jdks/temurin-21" >&2
return 1 2>/dev/null || exit 1
fi
if [ ! -d "$ANDROID_HOME/platforms" ]; then
echo "✗ No Android SDK at $ANDROID_HOME" >&2
echo " Reinstall: see mobile/README.md → Toolchain" >&2
return 1 2>/dev/null || exit 1
fi