NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Printing conf tree for kernel confs
On Sat, Jun 16, 2018 at 10:16:29AM +0530, Mayuresh wrote:
> Will fix that, unless some tool is already doing this.
With fix.
#!/usr/bin/env bash
indent() {
LEVEL=$1
for((i=0;i<$LEVEL;i++))
do
printf "\t"
done
}
incltree() {
CONF=$1
LEVEL=$2
grep -w include $CONF |
while read INCL CONFPATH
do
if [ "$INCL" != "include" ]
then
continue
fi
INCLCONF=`eval echo ../../../$CONFPATH`
indent $LEVEL
echo $INCLCONF
NEXTLEVEL=`expr $LEVEL + 1`
incltree $INCLCONF $NEXTLEVEL
done
}
ARCH=$1
ROOTCONF=$2
cd /usr/src/sys/arch/$ARCH/conf
incltree $ROOTCONF 0
Home |
Main Index |
Thread Index |
Old Index