t3-code-android-nightly/.repos/alchemy-effect/scripts/install
Julius Marminge bd851c0203
chore: add Alchemy reference repo subtree (#2918)
Co-authored-by: codex <codex@users.noreply.github.com>
2026-06-03 00:08:31 +00:00

38 lines
No EOL
866 B
Bash
Executable file

#!/usr/bin/env bash
# Load secrets from ./.env if the file exists
if [[ -f .env ]]; then
set -o allexport
source .env
set +o allexport
fi
# Installs system dependencies required for this project
UPDATE=0
for arg in "$@"; do
if [[ "$arg" == "--update" ]]; then
UPDATE=1
fi
done
# Install or update OpenCode (AI-powered development)
if ! command -v opencode >/dev/null 2>&1 || [[ "$UPDATE" -eq 1 ]]; then
curl -fsSL https://opencode.ai/install | bash
fi
install_brew() {
# $1: executable name
# $2: brew install argument
local exe="$1"
local formula="$2"
if ! command -v "$exe" >/dev/null 2>&1; then
brew install "$formula"
elif [[ "$UPDATE" -eq 1 ]]; then
brew upgrade "$formula"
fi
}
install_brew rg ripgrep
install_brew localstack localstack/tap/localstack-cli
localstack auth set-token $LOCALSTACK_TOKEN 2>&1 > /dev/null