#! /bin/sh
# copy a kernel's config file to ../`basename $PWD`.config, 
# backing up the previous config if necessary,
# and doing nothing if there's already a copy there
#

test -r .config || exit 1
d=`pwd`
d=../`basename $d`
test -r $d.config || exec sh -xc "cp .config $d.config"

cmp -s .config $d.config || { 
	bkp $d.config || exit 1
	sh -xc "cp .config $d.config"
}
