3 # ./update-cargo-metadata
4 # copies from toplevel Cargo.toml to others
5 # the part copied is the paragraph which starts with version=
9 fail () { echo >&2 "${0##*/}: error: $*"; exit 12; }
11 [ $# = 0 ] || fail "bad usage"
13 files=$(git ls-files :\*/Cargo.toml :Cargo.toml)
19 open I, "Cargo.toml" or die $!;
20 our $re = qr{^version\s*\=};
27 die "not found in ./Cargo.toml" unless defined $std;
37 $y or die "not found in '$f'";
42 echo "working tree file(s) maybe updated, check with git."