Skip to content

Commit

Permalink
scripts: Add script to reorder kernel config-* files
Browse files Browse the repository at this point in the history
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/openwrt#16743
Signed-off-by: Hauke Mehrtens <[email protected]>
  • Loading branch information
hauke committed Oct 22, 2024
1 parent 7e542f6 commit b881634
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions scripts/kconfig-reorder.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit b881634

Please sign in to comment.