Initial commit: Sarthi Lab desktop application
This commit is contained in:
46
launch.sh
Executable file
46
launch.sh
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# Handle commands
|
||||
case "$1" in
|
||||
upgrade)
|
||||
echo "Upgrading Sarthi Lab..."
|
||||
|
||||
# Check if git is available
|
||||
if ! command -v git &> /dev/null; then
|
||||
echo "Error: git is not installed. Please install git first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Pull latest changes
|
||||
echo "Pulling latest changes from repository..."
|
||||
git pull
|
||||
|
||||
# Install/update dependencies
|
||||
echo "Installing/updating dependencies..."
|
||||
npm install
|
||||
|
||||
echo "Upgrade complete! Starting Sarthi Lab..."
|
||||
npm run dev
|
||||
exit 0
|
||||
;;
|
||||
--help|-h)
|
||||
echo "Sarthi Lab Launcher"
|
||||
echo "Usage: sarthi-lab [command]"
|
||||
echo ""
|
||||
echo "Commands:"
|
||||
echo " (no command) Start Sarthi Lab (npm run dev)"
|
||||
echo " upgrade Pull latest git changes and update dependencies"
|
||||
echo " --help, -h Show this help"
|
||||
echo " --version, -v Show version"
|
||||
exit 0
|
||||
;;
|
||||
--version|-v)
|
||||
echo "Sarthi Lab $(node -p "require('./package.json').version")"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# Normal launch
|
||||
echo "Starting Sarthi Lab..."
|
||||
npm run dev
|
||||
Reference in New Issue
Block a user