Fix build.sh to skip venv creation and pip install when using --wssshtools-only

parent 4f48465d
......@@ -67,27 +67,26 @@ while [[ $# -gt 0 ]]; do
done
# Check if virtual environment exists, create if not
if [ ! -d "venv" ]; then
echo "Creating virtual environment..."
python3 -m venv venv
fi
# Activate virtual environment
. venv/bin/activate
# Install requirements
echo "Installing requirements..."
pip3 install -r requirements.txt
# Install pyinstaller if not already installed
pip3 install pyinstaller
# Create dist directory if not exists
mkdir -p dist
# Skip Python/C building if --debian-only or --wssshtools-only is specified
if [ "$BUILD_DEBIAN_ONLY" = false ] && [ "$BUILD_WSSSHTOOLS_ONLY" = false ]; then
# Check if virtual environment exists, create if not
if [ ! -d "venv" ]; then
echo "Creating virtual environment..."
python3 -m venv venv
fi
# Activate virtual environment
. venv/bin/activate
# Install requirements
echo "Installing requirements..."
pip3 install -r requirements.txt
# Install pyinstaller if not already installed
pip3 install pyinstaller
# Generate SSL certificates if they don't exist
if [ ! -f "cert.pem" ] || [ ! -f "key.pem" ]; then
echo "Generating SSL certificates..."
......@@ -200,8 +199,10 @@ if [ "$BUILD_DEBIAN" = true ]; then
fi
fi
# Deactivate venv
deactivate
# Deactivate venv if it was activated
if [ "$BUILD_DEBIAN_ONLY" = false ] && [ "$BUILD_WSSSHTOOLS_ONLY" = false ]; then
deactivate
fi
if [ "$BUILD_DEBIAN_ONLY" = true ]; then
echo "Debian package build complete."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment