Skip to content

Commit

Permalink
fix: ensure portability of tr
Browse files Browse the repository at this point in the history
Without this fix the execution of `tr` on a linux system would not work
as expected.

The following warning was shown at runtime:

> tr: warning: an unescaped backslash at end of string is not portable

Signed-off-by: Flavio Castelli <[email protected]>
  • Loading branch information
flavio committed Aug 30, 2023
1 parent 549d3c7 commit 52aca81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion install-template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fi
echo "Installing toolchain $HERMIT_TOOLCHAIN with rustup."
rustup toolchain install $HERMIT_TOOLCHAIN

RUSTC_SYSROOT="$(rustc +$HERMIT_TOOLCHAIN --print=sysroot | tr '\' '/')"
RUSTC_SYSROOT="$(rustc +$HERMIT_TOOLCHAIN --print=sysroot | tr '\\' '/')"
SCRIPT_DIR="${0%/*}"
echo "Installing rust-std-hermit to $RUSTC_SYSROOT"
"$SCRIPT_DIR/rust-install.sh" --prefix="$RUSTC_SYSROOT" --disable-ldconfig

0 comments on commit 52aca81

Please sign in to comment.