]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tools: (get-options.sh) ignore long opt definitions marked with IGNORECHECK=yes
authorChristian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Thu, 25 Dec 2025 03:54:29 +0000 (22:54 -0500)
committerChristian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Thu, 25 Dec 2025 05:38:00 +0000 (00:38 -0500)
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
tools/get-options.sh

index 49d798ce7ba76220b7f50c5f08c3a25890feba15..ef71729a4657454e9eb3b28bc57429f3aee4c8a7 100755 (executable)
 # GNU General Public License for more details.
 #
 # Copyright (C) 2025 Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
+#
+# This script extracts all long options from each program's source file
+# and prints them in an alphabetically sorted list.
+
 TOP_SRCDIR=${TOP_SRCDIR:-../}
 
 # Directories that contain relevant source files for util-linux programs.
@@ -60,7 +64,7 @@ function extract_long_opts() {
 
         awk -F ',' 'BEGIN { x = 0 }; \
                 /struct[[:space:]]*option[[:space:]]*.*[[:space:]]*\[\][[:space:]]*=[[:space:]]*(\{)?/ { x = 1 } \
-                x && ! /.*\/\*.*(deprecated|COMPLETION:no).*\*\/.*/ {  print $1 } \
+                x && ! /.*\/\*.*(deprecated|IGNORECHECK=yes).*\*\/.*/ {  print $1 } \
                 /\};/ { x = 0 }' "${src_path}"  \
                 | grep -Eo '".*"'               \
                 | tr -d '"'                     \