aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/dkms.postbuild
blob: a2ceff64a40b8cd1a1efe0279cf22cd60fc404fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

PROG=$0

while getopts "a:k:n:t:v:" opt; do
	case $opt in
		a) arch=$OPTARG    ;;
		k) kver=$OPTARG    ;;
		n) pkgname=$OPTARG ;;
		t) tree=$OPTARG    ;;
		v) pkgver=$OPTARG  ;;
		*) err=1           ;;
	esac
done

if [ -z "${arch}" ] || [ -z "${kver}" ] || [ -z "${pkgname}" ] || \
    [ -z "${tree}" ] || [ -z "${pkgver}" ] || [ -n "${err}" ]; then
	echo "Usage: $PROG -a <arch> -k <kver> -n <pkgname>" \
	    "-t <tree> -v <pkgver>"
	exit 1
fi

exec cp "${tree}/${pkgname}/${pkgver}/build/zfs_config.h"     \
   "${tree}/${pkgname}/${pkgver}/build/module/Module.symvers" \
   "${tree}/${pkgname}/${pkgver}/${kver}/${arch}/"