10-nvidia-drivers: run (echo and exec); set make-vars SYSSRC KBUILD_OUTPUT PWD

This commit is contained in:
Denis Knauf 2013-04-25 14:07:59 +02:00
parent 49e5ade7f5
commit f086afa409

View file

@ -1,12 +1,20 @@
#!/usr/bin/env sh
NVDSRC="${NVDSRC:-/usr/src/nvidia-drivers}"
run() {
echo "$*"
exec "$@"
}
[ -e "${0}.disabled" ] && exit 0
which make >/dev/null 2>&1 || exit 0
NVDSRC="${NVDSRC:-/usr/src/nvidia-drivers}"
[ -d "${NVDSRC}" ] || exit 0
V="${1:-`uname -r`}"
SYSSRC="/lib/modules/${V}/source"
SYSOUT="/lib/modules/${V}/build"
echo "Build NVIDIA module..." >&2
cd "${NVDSRC}"
exec make module-install SYSSRC="${SYSSRC}" PWD="${NVDSRC}"
run make module-install SYSSRC="${SYSSRC}" KBUILD_OUTPUT="${SYSOUT}" PWD="${NVDSRC}"