aboutsummaryrefslogtreecommitdiff
path: root/scripts/cfg2files.sh
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2007-06-18 01:09:00 -0400
committerRob Landley <rob@landley.net>2007-06-18 01:09:00 -0400
commite35f2b831201cbe220e97d1b36f8fec3981a9065 (patch)
treec7979d63c0603dee897252116fb56f5e4557ad97 /scripts/cfg2files.sh
parent132922a8789aa132069371416453b480306ddfdb (diff)
downloadtoybox-e35f2b831201cbe220e97d1b36f8fec3981a9065.tar.gz
Fix makefile to defconfig properly, and leak in a bit of the new test0.0.3
infrastructure so I don't have to revert it to check this in. :)
Diffstat (limited to 'scripts/cfg2files.sh')
-rwxr-xr-xscripts/cfg2files.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/cfg2files.sh b/scripts/cfg2files.sh
new file mode 100755
index 00000000..4f24c906
--- /dev/null
+++ b/scripts/cfg2files.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+# cat .config into this to get a list of .c files.
+
+# Grab the XXX part of all CONFIG_XXX entries, removing everything after the
+# second underline. Sort the list, keep only one of each entry, convert
+# to lower case, remove toybox itself from the list (as that indicates
+# global symbols).
+
+sed -nre 's/^CONFIG_(.*)=y/\1/;t skip;b;:skip;s/_.*//;p' \
+ | sort -u | tr A-Z a-z | grep -v '^toybox$'