mirror of
https://github.com/horizon-rust/horizon-mods.git
synced 2026-11-07 02:56:08 -10:00
The repositories moved from ludovic111 to horizon-rust. GitHub redirects the repository URLs, but not GitHub Pages: the index now lives at https://horizon-rust.github.io/horizon-mods/. The build passes --site so icon URLs use the new address without waiting for a new cargo-horizon-mod. Co-authored-by: Claude Opus 5.5 <[email protected]>
12 lines
600 B
Bash
Executable File
12 lines
600 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Installs cargo-horizon-mod from Horizon at $HORIZON_REV (a commit; the repository
|
|
# variable HORIZON_REV, else main). The registry's checks are that tool's.
|
|
set -euo pipefail
|
|
rev="${HORIZON_REV:-main}"
|
|
if command -v cargo-horizon-mod >/dev/null && [ "$(cat ~/.cargo/horizon-rev 2>/dev/null)" = "$rev" ]; then
|
|
exit 0
|
|
fi
|
|
cargo install --locked --git https://github.com/horizon-rust/horizon --rev "$rev" cargo-horizon-mod 2>/dev/null \
|
|
|| cargo install --locked --git https://github.com/horizon-rust/horizon --branch "$rev" cargo-horizon-mod
|
|
echo "$rev" > ~/.cargo/horizon-rev
|