From 9c94e213e1de9abdde3c010df2f8d08eba97ac6a Mon Sep 17 00:00:00 2001 From: Chuck Ebbert Date: Wed, 7 Sep 2011 19:40:53 -0400 Subject: Fix up scripts/sort-config so it works again. --- scripts/sort-config | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'scripts') 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 -- cgit