mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-16 00:00:37 +08:00
12 lines
229 B
Bash
Executable File
12 lines
229 B
Bash
Executable File
#! /usr/bin/env sh
|
|
set -euo pipefail
|
|
|
|
if ! version=$(grep -m 1 -oP '^\s*channel\s*=\s*"?\K([\d\.]+)' rust-toolchain.toml)
|
|
then
|
|
echo "fatal: no rust version found via rust-toolchain.toml" >&2
|
|
exit 1
|
|
else
|
|
echo "$version"
|
|
fi
|
|
|