-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
53 lines (46 loc) · 1.48 KB
/
run.sh
File metadata and controls
53 lines (46 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
# Manager Square (Manager²) - Linux/macOS Launcher
# Quick launcher for the management productivity tool
echo "Starting Manager Square..."
echo
# Check if Python is available
if ! command -v python3 &> /dev/null; then
if ! command -v python &> /dev/null; then
echo "ERROR: Python is not installed or not in PATH"
echo "Please install Python 3.8+ and try again"
exit 1
else
PYTHON_CMD="python"
fi
else
PYTHON_CMD="python3"
fi
# Check Python version
PYTHON_VERSION=$($PYTHON_CMD --version 2>&1 | awk '{print $2}')
PYTHON_MAJOR=$(echo $PYTHON_VERSION | cut -d. -f1)
PYTHON_MINOR=$(echo $PYTHON_VERSION | cut -d. -f2)
if [ "$PYTHON_MAJOR" -lt 3 ] || ([ "$PYTHON_MAJOR" -eq 3 ] && [ "$PYTHON_MINOR" -lt 8 ]); then
echo "ERROR: Python 3.8+ is required"
echo "Current version: $PYTHON_VERSION"
exit 1
fi
echo "Using Python $PYTHON_VERSION"
# Check if the single-file version exists
if [ -f "managersquare_single.py" ]; then
echo "Running single-file version with all features..."
$PYTHON_CMD managersquare_single.py
elif [ -f "managersquare/app.py" ]; then
echo "Running modular version..."
$PYTHON_CMD -m managersquare.app
else
echo "ERROR: Manager Square files not found"
echo "Please ensure you're running this from the correct directory"
exit 1
fi
# Check exit status
if [ $? -ne 0 ]; then
echo
echo "ERROR: Manager Square failed to start"
echo "Please check the error messages above"
exit 1
fi