Commit 50a1e7af authored by nextime's avatar nextime

Fix --debian-only to build only wsssh-tools package

- --debian-only now builds only wsssh-tools, not wsssh-server
- Updated help text to clarify --debian-only behavior
- Updated output messages for --debian-only vs --packages
parent d2d3fc32
......@@ -58,7 +58,7 @@ while [[ $# -gt 0 ]]; do
echo "Usage: $0 [options]"
echo "Options:"
echo " --debian Build Debian packages (wsssh-server and wsssh-tools)"
echo " --debian-only Build only Debian packages (skip binaries)"
echo " --debian-only Build only wsssh-tools Debian package (skip binaries and server)"
echo " --packages Build all Debian packages (equivalent to --debian-only)"
echo " --server-only Build only the server (wssshd) and wsssh-server Debian package"
echo " --no-server Skip building the server (wssshd) and wsssh-server package"
......@@ -197,8 +197,8 @@ if [ "$BUILD_DEBIAN" = true ]; then
echo "All Debian build dependencies found."
echo "Building Debian packages..."
# Build wsssh-server package if it exists and (not wssshtools-only OR server-only)
if ([ "$BUILD_WSSSHTOOLS_ONLY" = false ] || [ "$BUILD_SERVER_ONLY" = true ]) && [ -d "wsssh-server" ] && [ -d "wsssh-server/debian" ]; then
# Build wsssh-server package if it exists and (not wssshtools-only OR server-only) and not debian-only
if ([ "$BUILD_WSSSHTOOLS_ONLY" = false ] || [ "$BUILD_SERVER_ONLY" = true ]) && [ "$BUILD_DEBIAN_ONLY" = false ] && [ -d "wsssh-server" ] && [ -d "wsssh-server/debian" ]; then
echo "Building wsssh-server Debian package..."
cd wsssh-server
dpkg-buildpackage -us -uc
......@@ -208,8 +208,8 @@ if [ "$BUILD_DEBIAN" = true ]; then
echo "wsssh-server package built successfully."
fi
# Build wssshtools package if it exists and not server-only
if [ "$BUILD_SERVER_ONLY" = false ] && [ -d "wssshtools" ] && [ -d "wssshtools/debian" ]; then
# Build wssshtools package if it exists and (not server-only OR debian-only)
if ([ "$BUILD_SERVER_ONLY" = false ] || [ "$BUILD_DEBIAN_ONLY" = true ]) && [ -d "wssshtools" ] && [ -d "wssshtools/debian" ]; then
echo "Building wsssh-tools Debian package..."
cd wssshtools
dpkg-buildpackage -us -uc
......@@ -233,7 +233,13 @@ if [ "$BUILD_DEBIAN_ONLY" = false ] && [ "$BUILD_WSSSHTOOLS_ONLY" = false ]; the
deactivate
fi
if [ "$BUILD_DEBIAN_ONLY" = true ] || [ "$BUILD_PACKAGES" = true ]; then
if [ "$BUILD_DEBIAN_ONLY" = true ]; then
echo "Debian package build complete."
echo "Package available in dist/ directory:"
if ls dist/wsssh-tools*.deb >/dev/null 2>&1; then
echo "- dist/wsssh-tools*.deb (C tools Debian package)"
fi
elif [ "$BUILD_PACKAGES" = true ]; then
echo "Debian package build complete."
echo "Packages available in dist/ directory:"
if ls dist/wsssh-server*.deb >/dev/null 2>&1; then
......
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