Files

25 lines
942 B
Bash
Executable File

#!/usr/bin/env sh
set -eu
# Tauri CLI launches Cargo itself. Choose a direct Rust toolchain bin first so
# the project works even if a shell has not sourced ~/.cargo/env. The override
# is useful for custom or CI toolchain locations.
if [ -z "${RUST_TOOLCHAIN_BIN:-}" ]; then
case "$(uname -s)-$(uname -m)" in
Linux-x86_64) RUST_TOOLCHAIN_BIN="$HOME/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin" ;;
Darwin-arm64) RUST_TOOLCHAIN_BIN="$HOME/.rustup/toolchains/stable-aarch64-apple-darwin/bin" ;;
Darwin-x86_64) RUST_TOOLCHAIN_BIN="$HOME/.rustup/toolchains/stable-x86_64-apple-darwin/bin" ;;
*) RUST_TOOLCHAIN_BIN="" ;;
esac
fi
if [ -n "$RUST_TOOLCHAIN_BIN" ] && [ -d "$RUST_TOOLCHAIN_BIN" ]; then
export PATH="$RUST_TOOLCHAIN_BIN:$PATH"
fi
if [ "${1:-}" = "cargo-metadata" ]; then
exec cargo metadata --manifest-path src-tauri/Cargo.toml --no-deps --format-version 1
fi
exec ./node_modules/.bin/tauri "$@"