Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions z
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
#!/bin/sh
#!/usr/bin/env bash
# Copyright(c) The Maintainers of Nanvix.
# Licensed under the MIT License.

# OS dispatcher – delegates to platform-specific bootstrap wrapper.
case "$(uname -s 2>/dev/null)" in
MINGW* | MSYS* | CYGWIN* | Windows_NT) exec pwsh -NoLogo -File "$(dirname "$0")/z.ps1" "$@" ;;
*) exec "$(dirname "$0")/z.sh" "$@" ;;
# Unified entry point: delegates to z.sh (Linux/macOS) or z.ps1 (Windows).
# Requires nanvix-zutil to be installed (pip install nanvix-zutil).

set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

case "$(uname -s)" in
CYGWIN* | MINGW* | MSYS*)
exec powershell.exe -NoProfile -ExecutionPolicy Bypass \
-File "$SCRIPT_DIR/z.ps1" "$@"
;;
*)
exec "$SCRIPT_DIR/z.sh" "$@"
;;
esac
Loading