Quote shell variables in more places.

This commit is contained in:
Dan Gohman
2018-02-27 15:43:13 -08:00
parent d394ae0902
commit 111c97df6d

View File

@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
set -euo pipefail set -euo pipefail
cd $(dirname "$0") cd $(dirname "$0")
topdir=$(pwd) topdir="$(pwd)"
# All the cretonne-* crates have the same version number # All the cretonne-* crates have the same version number
# The filecheck crate version is managed independently. # The filecheck crate version is managed independently.
@@ -16,9 +16,9 @@ for crate in . lib/*; do
continue continue
fi fi
# Update the version number of this crate to $version. # Update the version number of this crate to $version.
sed -i "" -e "s/^version = .*/version = \"$version\"/" $crate/Cargo.toml sed -i "" -e "s/^version = .*/version = \"$version\"/" "$crate/Cargo.toml"
# Update the required version number of any cretonne* dependencies. # Update the required version number of any cretonne* dependencies.
sed -i "" -e "/^cretonne/s/version = \"[^\"]*\"/version = \"$version\"/" $crate/Cargo.toml sed -i "" -e "/^cretonne/s/version = \"[^\"]*\"/version = \"$version\"/" "$crate/Cargo.toml"
done done
# Update our local Cargo.lock (not checked in). # Update our local Cargo.lock (not checked in).
@@ -30,5 +30,5 @@ cargo update
# Note that libraries need to be published in topological order. # Note that libraries need to be published in topological order.
for crate in filecheck cretonne frontend native reader wasm; do for crate in filecheck cretonne frontend native reader wasm; do
echo cargo publish --manifest-path lib/$crate/Cargo.toml echo cargo publish --manifest-path "lib/$crate/Cargo.toml"
done done