[openwrt/openwrt] scripts: Add script to reorder kernel config-* files
LEDE Commits
lede-commits at lists.infradead.org
Tue Oct 22 12:16:19 PDT 2024
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b8816343fbf7f6c14573de43fd86a0ae544abfec
commit b8816343fbf7f6c14573de43fd86a0ae544abfec
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Tue Oct 22 00:02:28 2024 +0200
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: https://github.com/openwrt/openwrt/pull/16743
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
scripts/kconfig-reorder.sh | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/scripts/kconfig-reorder.sh b/scripts/kconfig-reorder.sh
new file mode 100755
index 0000000000..9ab7858d49
--- /dev/null
+++ b/scripts/kconfig-reorder.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# This script reorders all config-* files in the target directory.
+
+find_files=$(find target -type f -name 'config-*' -print)
+
+if [ -n "$find_files" ]; then
+ for file in $find_files; do
+ echo "Reordering options in $file"
+ LANG=C ./scripts/kconfig.pl '+' "$file" /dev/null > "$file"-new
+ mv "$file"-new "$file"
+ done
+else
+ echo "No files named config-* found."
+fi
+
More information about the lede-commits
mailing list