#!/bin/sh set -e kbpkg=@kbpkg@ cd $DEBIAN_SRCTOP { find . -path './scripts/*' -prune -o \ -path './Documentation/*' -prune -o \ -path './debian/*' -prune -o \ -type f \( -name Makefile -o -name 'Kconfig*' \) -print echo arch/@karch@/kernel/asm-offsets.s } | cpio -pd --preserve-modification-time $OLDPWD cd - > /dev/null ln -s ../$kbpkg/scripts . remove= cd include for i in asm-*; do case ${i#asm-} in generic | @header_dirs@) ;; *) remove="$remove $i" ;; esac done ${remove:+rm -r $remove}