Fix --wssshtools-only option to build only C implementations

- Move C building logic outside Python-building conditional block
- Ensure --wssshtools-only builds all C tools (wssshc, wsssh, wsscp)
- Skip Python binary building when --wssshtools-only is specified
- Maintain compatibility with other build options
parent e6376dfa
......@@ -48,6 +48,7 @@ while [[ $# -gt 0 ]]; do
esac
done
# Check if virtual environment exists, create if not
if [ ! -d "venv" ]; then
echo "Creating virtual environment..."
......@@ -121,14 +122,18 @@ if [ "$BUILD_DEBIAN_ONLY" = false ] && [ "$BUILD_WSSSHTOOLS_ONLY" = false ]; the
pyinstaller --onefile --distpath dist --runtime-tmpdir /tmp --clean wsscp.py
fi
fi
fi
# Build C version if wssshtools directory exists
if [ -d "wssshtools" ]; then
# Build C version if wssshtools directory exists and not debian-only
if [ "$BUILD_DEBIAN_ONLY" = false ] && [ -d "wssshtools" ]; then
echo "Building C version..."
cd wssshtools
if [ -f "configure.sh" ]; then
./configure.sh
if [ "$BUILD_SERVER_ONLY" = true ]; then
if [ "$BUILD_WSSSHTOOLS_ONLY" = true ]; then
# Build all C tools for wssshtools-only mode
make
elif [ "$BUILD_SERVER_ONLY" = true ]; then
# Build only wssshc (client) for server-only mode
make wssshc
elif [ "$BUILD_NO_SERVER" = true ]; then
......@@ -142,7 +147,6 @@ if [ "$BUILD_DEBIAN_ONLY" = false ] && [ "$BUILD_WSSSHTOOLS_ONLY" = false ]; the
echo "Warning: configure.sh not found in wssshtools/"
cd ..
fi
fi
fi
# Build Debian package if requested
......
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