projects
/
openwrt
/
staging
/
jow.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e542f6
)
scripts: Add script to reorder kernel config-* files
author
Hauke Mehrtens
<
[email protected]
>
Mon, 21 Oct 2024 22:02:28 +0000
(
00:02
+0200)
committer
Hauke Mehrtens
<
[email protected]
>
Tue, 22 Oct 2024 19:13:26 +0000
(21:13 +0200)
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 <
[email protected]
>
scripts/kconfig-reorder.sh
[new file with mode: 0755]
patch
|
blob
diff --git a/scripts/kconfig-reorder.sh
b/scripts/kconfig-reorder.sh
new file mode 100755
(executable)
index 0000000..
9ab7858
--- /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
+