mirror of
https://github.com/warpdotdev/warp.git
synced 2026-05-07 07:38:59 +08:00
- new `script/warp_sudo`: echoes each privileged command, prompts
`[y/N]` from `/dev/tty`, shells to real `sudo` on confirm.
`WARP_BOOTSTRAP_YES=1` or non-tty stdin skips.
- `script/bootstrap`: static `--help` install list dropped. `-y`/`--yes`
exports `WARP_BOOTSTRAP_YES=1` for children.
- ten direct `sudo` call-sites in `script/{macos,linux}/bootstrap` +
`script/linux/install_{build,runtime,test}_deps` switched to
`warp_sudo`. windows unchanged.
- `README.md`: short "what `./script/bootstrap` does" subsection
pointing at the platform scripts as the source of truth.
closes #9421.
26 lines
716 B
Bash
Executable File
26 lines
716 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Bootstrap dispatches to the platform-specific install scripts. Each step
|
|
# that needs root sources `script/warp_sudo` and asks for confirmation
|
|
# before running. Pass -y / --yes (or set WARP_SKIP_SUDO_PROMPT=1) to skip
|
|
# the prompts in unattended environments.
|
|
|
|
for arg in "$@"; do
|
|
case "$arg" in
|
|
-y|--yes) export WARP_SKIP_SUDO_PROMPT=1 ;;
|
|
esac
|
|
done
|
|
|
|
OS_TYPE="$(uname -s)"
|
|
|
|
if [[ "$OS_TYPE" = "Darwin" ]]; then
|
|
./script/macos/bootstrap "$@"
|
|
elif [[ "$OS_TYPE" = "Linux" ]]; then
|
|
./script/linux/bootstrap "$@"
|
|
elif [[ "$OS_TYPE" =~ ^[MINGW64_NT|MSYS_NT] ]]; then
|
|
./script/windows/bootstrap.ps1 "$@"
|
|
else
|
|
echo "No bootstrap script defined for the current platform!"
|
|
exit 1
|
|
fi
|