mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-05 11:15:57 +00:00
fix: Add vt script to git and remove from .gitignore
The vt script was previously gitignored which caused build failures on fresh checkouts. This script is required by the Xcode build process during the "Copy VT Script" phase.
This commit is contained in:
parent
1dd8a55fc6
commit
d87f1b6e10
2 changed files with 48 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -115,4 +115,3 @@ linux/vt-go
|
|||
linux/vibetunnel-go
|
||||
/vibetunnel-go
|
||||
/vt-go
|
||||
/linux/cmd/vt/vt
|
||||
|
|
|
|||
48
linux/cmd/vt/vt
Executable file
48
linux/cmd/vt/vt
Executable file
|
|
@ -0,0 +1,48 @@
|
|||
#!/bin/bash
|
||||
# vt - VibeTunnel CLI wrapper
|
||||
# Simple bash wrapper that passes through to vibetunnel with shell expansion
|
||||
|
||||
VERSION="1.0.3"
|
||||
|
||||
# Handle version flag
|
||||
if [ "$1" = "--version" ] || [ "$1" = "-v" ]; then
|
||||
echo "vt version $VERSION"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Find vibetunnel binary (prefer Go implementation)
|
||||
if [ -x "/usr/local/bin/vibetunnel" ]; then
|
||||
VIBETUNNEL="/usr/local/bin/vibetunnel"
|
||||
elif [ -x "/Users/steipete/Projects/vibetunnel/linux/build/vibetunnel" ]; then
|
||||
VIBETUNNEL="/Users/steipete/Projects/vibetunnel/linux/build/vibetunnel"
|
||||
elif [ -x "./vibetunnel" ]; then
|
||||
VIBETUNNEL="./vibetunnel"
|
||||
elif command -v vibetunnel >/dev/null 2>&1; then
|
||||
VIBETUNNEL="vibetunnel"
|
||||
elif [ -x "/Applications/VibeTunnel.app/Contents/Resources/tty-fwd" ]; then
|
||||
# Fallback to Rust implementation if Go version not found
|
||||
VIBETUNNEL="/Applications/VibeTunnel.app/Contents/Resources/tty-fwd"
|
||||
else
|
||||
echo >&2 "Error: vibetunnel not found. Please install it first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Use the user's shell to resolve aliases and run commands
|
||||
USER_SHELL="${SHELL:-/bin/bash}"
|
||||
SHELL_NAME=$(basename "$USER_SHELL")
|
||||
|
||||
# Execute through shell to resolve aliases, functions, and builtins
|
||||
case "$SHELL_NAME" in
|
||||
zsh)
|
||||
# For zsh, use interactive mode to get aliases
|
||||
exec "$VIBETUNNEL" --do-not-allow-column-set=true -- "$USER_SHELL" -i -c "$(printf '%q ' "$@")"
|
||||
;;
|
||||
bash)
|
||||
# For bash, expand aliases in non-interactive mode
|
||||
exec "$VIBETUNNEL" --do-not-allow-column-set=true -- "$USER_SHELL" -c "shopt -s expand_aliases; source ~/.bashrc 2>/dev/null || source ~/.bash_profile 2>/dev/null || true; $(printf '%q ' "$@")"
|
||||
;;
|
||||
*)
|
||||
# Generic shell handling
|
||||
exec "$VIBETUNNEL" --do-not-allow-column-set=true -- "$USER_SHELL" -c "$(printf '%q ' "$@")"
|
||||
;;
|
||||
esac
|
||||
Loading…
Reference in a new issue