Compare commits

..

1 Commits

Author SHA1 Message Date
7e431d98e9 Version v0.3.19 - Completed modularization project 2025-10-05 08:59:31 -04:00
3 changed files with 29 additions and 14 deletions

View File

@@ -16,18 +16,31 @@ print_error() { echo -e "${RED}[ERROR]${NC} $1"; }
# Global variable for commit message # Global variable for commit message
COMMIT_MESSAGE="" COMMIT_MESSAGE=""
# Parse command line arguments for -m flag # Parse command line arguments - check if first arg is a command, otherwise treat as commit message
while [[ $# -gt 0 ]]; do COMMAND=""
case $1 in if [[ $# -gt 0 ]]; then
-m|--message) case "$1" in
COMMIT_MESSAGE="$2" build|clean|install|uninstall)
shift 2 COMMAND="$1"
shift
;; ;;
*) *)
# Keep other arguments for main logic # First argument is not a command, so default to build and treat all args as commit message
break COMMAND="build"
;; ;;
esac esac
else
# No arguments, default to build
COMMAND="build"
fi
# Any remaining arguments become the commit message
for arg in "$@"; do
if [[ -z "$COMMIT_MESSAGE" ]]; then
COMMIT_MESSAGE="$arg"
else
COMMIT_MESSAGE="$COMMIT_MESSAGE $arg"
fi
done done
# Function to automatically increment version # Function to automatically increment version
@@ -321,7 +334,7 @@ uninstall_project() {
} }
# Main script logic # Main script logic
case "${1:-build}" in case "$COMMAND" in
build) build)
build_project build_project
;; ;;
@@ -336,10 +349,11 @@ case "${1:-build}" in
;; ;;
*) *)
echo "OTP Cipher Build Script" echo "OTP Cipher Build Script"
echo "Usage: $0 [-m \"commit message\"] {build|clean|install|uninstall}" echo "Usage: $0 [command] [commit message]"
echo "" echo ""
echo "Options:" echo "Arguments:"
echo " -m, --message \"text\" - Specify commit message (skips interactive prompt)" echo " command - {build|clean|install|uninstall} (default: build)"
echo " commit message - Text to use as commit message (optional, skips interactive prompt)"
echo "" echo ""
echo "Commands:" echo "Commands:"
echo " build - Cross-compile for x86_64 and ARM64/AArch64 with automatic version increment (default)" echo " build - Cross-compile for x86_64 and ARM64/AArch64 with automatic version increment (default)"
@@ -357,8 +371,9 @@ case "${1:-build}" in
echo "" echo ""
echo "Examples:" echo "Examples:"
echo " $0" echo " $0"
echo " $0 -m \"Fixed checksum parsing bug\"" echo " $0 \"Fixed checksum parsing bug\""
echo " $0 --message \"Added new feature\" build" echo " $0 build \"Added new feature\""
echo " $0 clean"
exit 1 exit 1
;; ;;
esac esac

BIN
otp-arm64

Binary file not shown.

Binary file not shown.