aboutsummaryrefslogtreecommitdiff
path: root/scripts/genconfig.sh
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2012-08-25 14:25:22 -0500
committerRob Landley <rob@landley.net>2012-08-25 14:25:22 -0500
commit3a9241add947cb6d24b5de7a8927517426a78795 (patch)
treed122ab6570439cd6b17c7d73ed8d4e085e0b8a95 /scripts/genconfig.sh
parent689f095bc976417bf50810fe59a3b3ac32b21105 (diff)
downloadtoybox-3a9241add947cb6d24b5de7a8927517426a78795.tar.gz
Move commands into "posix", "lsb", and "other" menus/directories.
Diffstat (limited to 'scripts/genconfig.sh')
-rwxr-xr-xscripts/genconfig.sh23
1 files changed, 17 insertions, 6 deletions
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
}