Commit 79489824 authored by nextime's avatar nextime

Add --packages option to build.sh script

- Added new --packages option that builds all Debian packages
- Equivalent to running --debian-only (builds both wsssh-server and wsssh-tools packages)
- Updated help text and usage information
- Updated final output message to handle --packages option
- Provides convenient way to build all packages in one command
- Maintains backward compatibility with existing options
parent 79e67da7
...@@ -24,6 +24,7 @@ BUILD_DEBIAN_ONLY=false ...@@ -24,6 +24,7 @@ BUILD_DEBIAN_ONLY=false
BUILD_SERVER_ONLY=false BUILD_SERVER_ONLY=false
BUILD_NO_SERVER=false BUILD_NO_SERVER=false
BUILD_WSSSHTOOLS_ONLY=false BUILD_WSSSHTOOLS_ONLY=false
BUILD_PACKAGES=false
while [[ $# -gt 0 ]]; do while [[ $# -gt 0 ]]; do
case $1 in case $1 in
--debian) --debian)
...@@ -35,6 +36,11 @@ while [[ $# -gt 0 ]]; do ...@@ -35,6 +36,11 @@ while [[ $# -gt 0 ]]; do
BUILD_DEBIAN=true BUILD_DEBIAN=true
shift shift
;; ;;
--packages)
BUILD_PACKAGES=true
BUILD_DEBIAN=true
shift
;;
--server-only) --server-only)
BUILD_SERVER_ONLY=true BUILD_SERVER_ONLY=true
BUILD_DEBIAN=true BUILD_DEBIAN=true
...@@ -53,6 +59,7 @@ while [[ $# -gt 0 ]]; do ...@@ -53,6 +59,7 @@ while [[ $# -gt 0 ]]; do
echo "Options:" echo "Options:"
echo " --debian Build Debian packages (wsssh-server and wsssh-tools)" echo " --debian Build Debian packages (wsssh-server and wsssh-tools)"
echo " --debian-only Build only Debian packages (skip binaries)" echo " --debian-only Build only Debian packages (skip binaries)"
echo " --packages Build all Debian packages (equivalent to --debian-only)"
echo " --server-only Build only the server (wssshd) and wsssh-server Debian package" 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" echo " --no-server Skip building the server (wssshd) and wsssh-server package"
echo " --wssshtools-only Build only the C tools (wssshtools) and wsssh-tools package" echo " --wssshtools-only Build only the C tools (wssshtools) and wsssh-tools package"
...@@ -61,7 +68,7 @@ while [[ $# -gt 0 ]]; do ...@@ -61,7 +68,7 @@ while [[ $# -gt 0 ]]; do
;; ;;
*) *)
echo "Unknown option: $1" echo "Unknown option: $1"
echo "Usage: $0 [--debian] [--debian-only] [--server-only] [--no-server] [--wssshtools-only] [--help]" echo "Usage: $0 [--debian] [--debian-only] [--packages] [--server-only] [--no-server] [--wssshtools-only] [--help]"
echo "Try '$0 --help' for more information." echo "Try '$0 --help' for more information."
exit 1 exit 1
;; ;;
...@@ -226,7 +233,7 @@ if [ "$BUILD_DEBIAN_ONLY" = false ] && [ "$BUILD_WSSSHTOOLS_ONLY" = false ]; the ...@@ -226,7 +233,7 @@ if [ "$BUILD_DEBIAN_ONLY" = false ] && [ "$BUILD_WSSSHTOOLS_ONLY" = false ]; the
deactivate deactivate
fi fi
if [ "$BUILD_DEBIAN_ONLY" = true ]; then if [ "$BUILD_DEBIAN_ONLY" = true ] || [ "$BUILD_PACKAGES" = true ]; then
echo "Debian package build complete." echo "Debian package build complete."
echo "Packages available in dist/ directory:" echo "Packages available in dist/ directory:"
if ls dist/wsssh-server*.deb >/dev/null 2>&1; then 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