diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/sort-config | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/scripts/sort-config b/scripts/sort-config index bc497ea0b..2b9da1ef3 100755 --- a/scripts/sort-config +++ b/scripts/sort-config @@ -1,11 +1,15 @@ #!/bin/bash +FC=($(fedpkg verrel | awk -F. '{print $NF}')) + SRC=($(ls config-* 2>/dev/null)) -TGT=($(ls kernel-*/linux-*.noarch/configs/kernel-2.6.*-*.config \ - kernel-*/linux-*.noarch/configs/kernel-2.6.*-*-debug.config 2>/dev/null)) -TGT1=(${TGT[*]#kernel-*/linux-*.noarch/configs/kernel-2.6.*-}) + +TGT=($(ls kernel-*.$FC/linux-*.noarch/configs/kernel-*-*.config \ + kernel-*.$FC/linux-*.noarch/configs/kernel-*-*-debug.config 2>/dev/null)) +TGT1=(${TGT[*]#kernel-*.$FC/linux-*.noarch/configs/kernel-*-}) ALL_OPTS="cdfimn" + if [ $# -lt 2 ] ; then echo -e "Usage:\n $(basename $0) [-$ALL_OPTS] input target\n" echo -e " Sort input config file into the same order as the target\n" @@ -62,11 +66,11 @@ rm -f $TEMPFILES SRCFILE=config-$1 [ ! -f $SRCFILE ] && echo "Input file" $SRCFILE "missing" && exit 2 -TGTFILE=kernel-*/linux-*.noarch/configs/kernel-2.6.*-$2.config +TGTFILE=kernel-*.$FC/linux-*.noarch/configs/kernel-*-$2.config [ ! -f $TGTFILE ] && echo "No target file matching" $TGTFILE "exists" && exit 2 [ "$FIND_IMPOSS" ] && \ - find kernel-*/*.noarch -name Kconfig\* -type f \ + find kernel-*.$FC/*.noarch -name Kconfig\* -type f \ | xargs egrep -s -h '^[[:space:]]*(menu)?config[[:space:]]+' \ | sed -r 's/^[[:space:]]*(menu)?config[[:space:]]+/CONFIG_/' \ | sort | uniq >xx98 |