From 85c7c2a8a25c974369002aea5537c7a0de8ab15f Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Thu, 5 Sep 2024 13:24:15 -0400 Subject: [PATCH] Treat `\` in `cargo package -l` output as `/` --- cargo-zng | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cargo-zng b/cargo-zng index a482089c..be53d6dd 100755 --- a/cargo-zng +++ b/cargo-zng @@ -2,7 +2,11 @@ set -eu trap 'rm -rf "$tempdir"' 0 INT tempdir="$(mktemp -d)" -cargo package -l --allow-dirty | grep -v '^Cargo\.toml\.orig$' | tar --files-from=- -cf - | tar -C "$tempdir" -xf - +cargo package -l --allow-dirty | + tr '\\' '/' | + grep -v '^Cargo\.toml\.orig$' | + tar --files-from=- -cf - | + tar -C "$tempdir" -xf - cp Cargo-zng.toml "$tempdir/Cargo.toml" cp -a systest "$tempdir/systest" mv "$tempdir/systest/Cargo-zng.toml" "$tempdir/systest/Cargo.toml"