From 3a9241add947cb6d24b5de7a8927517426a78795 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 25 Aug 2012 14:25:22 -0500 Subject: Move commands into "posix", "lsb", and "other" menus/directories. --- scripts/genconfig.sh | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'scripts/genconfig.sh') diff --git a/scripts/genconfig.sh b/scripts/genconfig.sh index 2334d8a9..accf0dba 100755 --- a/scripts/genconfig.sh +++ b/scripts/genconfig.sh @@ -26,14 +26,25 @@ EOF genconfig() { - # extract config stanzas from each command source file, in alphabetical order - - for i in $(ls -1 toys/*.c) + # I could query the directory here, but I want to control the order + # and capitalization in the menu + for j in Posix LSB Other do - # Grab the config block for Config.in - echo "# $i" - sed -n '/^\*\//q;/^config [A-Z]/,$p' $i || return 1 + echo "menu \"$j commands\"" echo + + DIR=$(echo $j | tr A-Z a-z) + + # extract config stanzas from each source file, in alphabetical order + for i in $(ls -1 toys/$DIR/*.c) + do + # Grab the config block for Config.in + echo "# $i" + sed -n '/^\*\//q;/^config [A-Z]/,$p' $i || return 1 + echo + done + + echo endmenu done } -- cgit v1.2.3