forked from FastLED/FastLED
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathcompile
More file actions
executable file
·42 lines (36 loc) · 998 Bytes
/
compile
File metadata and controls
executable file
·42 lines (36 loc) · 998 Bytes
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
#!/bin/bash
set -e
# Function to find Python executable
find_python() {
if command -v python3 &> /dev/null; then
echo "python3"
elif command -v python &> /dev/null; then
echo "python"
else
echo "Python not found. Please install Python 3."
exit 1
fi
}
# Check if uv is installed, if not, install it
if ! command -v uv &> /dev/null; then
echo "uv command not found. Installing uv..."
PYTHON=$(find_python)
$PYTHON -m pip install uv
fi
cd "$(dirname "$0")"
# Skip .venv setup if running inside Docker (system packages are pre-installed)
if [ -z "$FASTLED_DOCKER" ]; then
# if .venv not found
if [ ! -d .venv ]; then
# create virtual environment
./install
fi
fi
interactive_stmt=""
# if no arguments
if [ $# -eq 0 ]; then
# set interactive statement
interactive_stmt="--interactive"
fi
echo -e "\nRunning uv run ci/ci-compile.py $interactive_stmt $@\n"
uv run ci/ci-compile.py $interactive_stmt "$@"