firecrown/bin/init
2026-03-12 21:57:41 +01:00

47 lines
1,017 B
Bash
Executable file

#!/usr/bin/env zsh
source "${0:a:h}/lib/env"
source "$lib/git"
source "$lib/west"
#=== get dependencies
echo '>>> downloading dependencies'
{
clone-gh birdsong-zmk galaxyeden/birdsong-zmk && \
git -C "$mod/birdsong-zmk" switch birdsong-zmk 2>&1 \
| grep -Ev 'Already on|Your branch is up to date'
} &
clone-gh mcuboot mcu-tools/mcuboot &
clone-bird birdsong-devices &
clone-bird birdsong-net &
clone zfetch "ravy.dev/mint/zfetch" &
cargo install --git https://github.com/vouch-opensource/mcumgr-client.git
wait
#=== prepare dependencies
echo '>>> setting up workspace'
if [[ ! -d "$app" ]] \
mkdir -p "$app"
pushd "$app"
#--- setup west
if [[ ! -d .venv ]] \
python3 -m venv .venv
activate
pip-fmt pip install west
#--- setup mainline zephyr
echo '>>> initializing upstream zephyr'
zephyr-setup
pip-fmt west packages pip --install
popd
zephyr-sdk "0.17.4"
#--- setup zmk zephyr
echo '>>> initializing zmk zephyr'
pushd "$mod/birdsong-zmk"
zephyr-setup -l app/
popd
zephyr-sdk "0.17.0"