mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-15 15:16:37 +00:00
fixx git.sh for win
Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
parent
a4b61cde23
commit
2552f24abb
1 changed files with 5 additions and 3 deletions
|
@ -22,7 +22,7 @@ GIT="$(mktemp -d 2>/dev/null || mktemp -d -t 'git')"
|
|||
if [ "$OSTYPE" = "cygwin" ] || [ "$OSTYPE" = "msys" ]; then
|
||||
# Convert it to windows path so `--git "file://$GIT"` would work
|
||||
# on windows.
|
||||
GIT="$(cygpath -m "$GIT")"
|
||||
GIT="$(cygpath -w "$GIT")"
|
||||
fi
|
||||
|
||||
git init "$GIT"
|
||||
|
@ -49,13 +49,15 @@ cp -r manifests/workspace/* "$GIT"
|
|||
)
|
||||
COMMIT_HASH="$(cd "$GIT" && git rev-parse HEAD)"
|
||||
|
||||
source="(git+file://$(cygpath -m "$GIT")#$COMMIT_HASH)"
|
||||
|
||||
# Install cargo-binstall using `--git`
|
||||
"./$1" binstall --force --git "file://$GIT" --no-confirm cargo-binstall
|
||||
|
||||
test_cargo_binstall_install
|
||||
|
||||
cat "$CARGO_HOME/.crates.toml"
|
||||
grep -F "cargo-binstall 0.12.0 (git+file://$GIT#$COMMIT_HASH)" <"$CARGO_HOME/.crates.toml"
|
||||
grep -F "cargo-binstall 0.12.0 $source" <"$CARGO_HOME/.crates.toml"
|
||||
|
||||
# Install cargo-watch using `--git`
|
||||
"./$1" binstall --force --git "file://$GIT" --no-confirm cargo-watch
|
||||
|
@ -66,4 +68,4 @@ echo "$cargo_watch_version"
|
|||
[ "$cargo_watch_version" = "cargo-watch 8.4.0" ]
|
||||
|
||||
cat "$CARGO_HOME/.crates.toml"
|
||||
grep -F "cargo-watch 8.4.0 (git+file://$GIT#$COMMIT_HASH)" <"$CARGO_HOME/.crates.toml"
|
||||
grep -F "cargo-watch 8.4.0 $source" <"$CARGO_HOME/.crates.toml"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue