Skip to content

Commit b881634

Browse files
committed
scripts: Add script to reorder kernel config-* files
This script will reorder the content of all config-* files in the target folder. It will also remove duplicates. It will not remove options already defined in the generic configuration. Link: openwrt#16743 Signed-off-by: Hauke Mehrtens <[email protected]>
1 parent 7e542f6 commit b881634

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

scripts/kconfig-reorder.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/sh
2+
3+
# This script reorders all config-* files in the target directory.
4+
5+
find_files=$(find target -type f -name 'config-*' -print)
6+
7+
if [ -n "$find_files" ]; then
8+
for file in $find_files; do
9+
echo "Reordering options in $file"
10+
LANG=C ./scripts/kconfig.pl '+' "$file" /dev/null > "$file"-new
11+
mv "$file"-new "$file"
12+
done
13+
else
14+
echo "No files named config-* found."
15+
fi
16+

0 commit comments

Comments
 (0)