Fix up scripts/sort-config so it works again.

This commit is contained in:
Chuck Ebbert 2011-09-07 19:40:53 -04:00
parent 1bc752781f
commit 9c94e213e1

View File

@ -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