add vodozemac
This commit is contained in:
parent
f0a397f576
commit
ec48e3ae96
8 changed files with 53 additions and 8 deletions
35
nix/fake-rustup.sh
Normal file
35
nix/fake-rustup.sh
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#!/usr/bin/env bash
|
||||
# Fake rustup for nix-managed Rust toolchains
|
||||
|
||||
case "$1" in
|
||||
run)
|
||||
if [[ "$2" == "stable" ]]; then
|
||||
shift 2
|
||||
if [[ $# -eq 0 ]]; then
|
||||
echo "fake rustup: no command given" >&2
|
||||
exit 1
|
||||
fi
|
||||
exec "$@"
|
||||
exit 0
|
||||
fi
|
||||
;;
|
||||
|
||||
toolchain)
|
||||
if [[ "$2" == "list" ]]; then
|
||||
echo "stable (default)"
|
||||
exit 0
|
||||
fi
|
||||
;;
|
||||
|
||||
target)
|
||||
if [[ "$2" == "list" && "$3" == "--toolchain" && "$4" == "stable" && "$5" == "--installed" ]]; then
|
||||
echo "x86_64-unknown-linux-gnu"
|
||||
exit 0
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "fake rustup: the command:" >&2
|
||||
echo " rustup $*" >&2
|
||||
echo "…is not mocked yet" >&2
|
||||
exit 1
|
||||
Loading…
Add table
Add a link
Reference in a new issue