anza-cryptography-source/scripts/read-cargo-variable.sh
zz-sol 1384fe1040
[chore] ci for crate release (#7)
* refactor and merge curve and ed crates

* fmt

* ci

* fmt again

* ci

* Update bench.rs

* fix ubuntu

* CI for crate release

* Update README.md
2026-04-15 08:44:33 -04:00

14 lines
322 B
Bash

# source this file
readCargoVariable() {
declare variable="$1"
declare Cargo_toml="$2"
while read -r name equals value _; do
if [[ $name = "$variable" && $equals = = ]]; then
echo "${value//\"/}"
return
fi
done < <(cat "$Cargo_toml")
echo "Unable to locate $variable in $Cargo_toml" 1>&2
}