37 lines
1.4 KiB
Bash
Executable File
37 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
# VT Player Convenience Script
|
|
# Source this file in your shell to add the 'VTPlayer' command
|
|
|
|
PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
|
|
# Create alias and function for VT Player
|
|
alias VTPlayer="bash $PROJECT_ROOT/scripts/run.sh"
|
|
|
|
# Also create a rebuild function for quick rebuilds
|
|
VTPlayerRebuild() {
|
|
echo "🔨 Rebuilding VT Player..."
|
|
bash "$PROJECT_ROOT/scripts/build.sh"
|
|
}
|
|
|
|
# Create a clean function
|
|
VTPlayerClean() {
|
|
echo "🧹 Cleaning VT Player build artifacts..."
|
|
cd "$PROJECT_ROOT"
|
|
go clean -cache -modcache -testcache
|
|
rm -f "$PROJECT_ROOT/VTPlayer"
|
|
echo "✓ Clean complete"
|
|
}
|
|
|
|
echo "════════════════════════════════════════════════════════════════"
|
|
echo "✅ VT Player Commands Available"
|
|
echo "════════════════════════════════════════════════════════════════"
|
|
echo ""
|
|
echo "Commands:"
|
|
echo " VTPlayer - Run VT Player (auto-builds if needed)"
|
|
echo " VTPlayerRebuild - Force rebuild of VT Player"
|
|
echo " VTPlayerClean - Clean build artifacts and cache"
|
|
echo ""
|
|
echo "To make these permanent, add this line to your ~/.bashrc or ~/.zshrc:"
|
|
echo " source $PROJECT_ROOT/scripts/alias.sh"
|
|
echo ""
|