mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-20 20:48:43 +00:00
17 lines
433 B
Bash
17 lines
433 B
Bash
#!/bin/bash
|
|
|
|
set -euxo pipefail
|
|
|
|
unset CARGO_INSTALL_ROOT
|
|
|
|
export CARGO_HOME=$(mktemp -d 2>/dev/null || mktemp -d -t 'cargo-home')
|
|
othertmpdir=$(mktemp -d 2>/dev/null || mktemp -d -t 'cargo-test')
|
|
export PATH="$CARGO_HOME/bin:$othertmpdir/bin:$PATH"
|
|
|
|
mkdir -p "$othertmpdir/bin"
|
|
# Copy it to bin to test use of env var `CARGO`
|
|
cp "./$1" "$othertmpdir/bin/"
|
|
|
|
|
|
cargo binstall --no-confirm cargo-watch@8.4.0
|
|
cargo uninstall cargo-watch
|