From b61daf81b0d9e4d1e0d2ccd8259252785e3e19d2 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 23 Apr 2026 19:23:12 +0100 Subject: [PATCH] Allow as many dashes as provided on Config options. --- Config | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Config b/Config index eb73329c5..056147662 100755 --- a/Config +++ b/Config @@ -98,7 +98,12 @@ CAN_QUICK="no" ########################################################################### while [ $# -ge 1 ] ; do - if [ $1 = "--help" ] ; then + OPTION=$1 + while [ "${OPTION#-}" != "$OPTION" ]; do + OPTION="${OPTION#-}" + done + + if [ "$OPTION" = "--help" ] ; then echo "Config utility for Anope" echo "------------------------" echo "Syntax: ./Config [options]" @@ -106,15 +111,15 @@ while [ $# -ge 1 ] ; do echo "-nointro Skip intro (disclaimer, etc)" echo "-quick Skip questions, go straight to cmake" exit 0 - elif [ $1 = "-devel" ] ; then + elif [ "$OPTION" = "devel" ] ; then DEBUG="yes" DEVEL="yes" INSTDIR="$SOURCE_DIR/run" - elif [ $1 = "-nocache" ] ; then + elif [ "$OPTION" = "nocache" ] ; then IGNORE_CACHE="1" - elif [ $1 = "-nointro" ] ; then + elif [ "$OPTION" = "nointro" ] ; then NO_INTRO="1" - elif [ $1 = "-quick" -o $1 = "-q" ] ; then + elif [ "$OPTION" = "quick" -o "$OPTION" = "q" ] ; then Load_Cache if [ "$CAN_QUICK" = "yes" ] ; then Run_Build_System