install_openrc_video.sh 1.34 KB
Newer Older
Aaditya Bagga's avatar
Aaditya Bagga committed
1 2 3 4
#!/bin/sh
# install_openrc_video.sh

DESTDIR=$1
5
SYSCONFDIR=${SYSCONFDIR:-etc}
Aaditya Bagga's avatar
Aaditya Bagga committed
6 7 8

_gentoo_uri="gentoo"

9 10
# arch detection for /lib
LIBDIRSUFFIX=""
Aaditya Bagga's avatar
Aaditya Bagga committed
11
if [ "$(uname -m)" = "x86_64" ]; then
12 13 14
  LIBDIRSUFFIX="64"
fi

Aaditya Bagga's avatar
Aaditya Bagga committed
15 16 17
# files
_Cbumb=${_gentoo_uri}/x11-misc/bumblebee/files/bumblebee.confd
_Ibumb=${_gentoo_uri}/x11-misc/bumblebee/files/bumblebee.initd
Aaditya Bagga's avatar
Aaditya Bagga committed
18
_Inv=${_gentoo_uri}/x11-drivers/nvidia-drivers/files/nvidia-smi.init
Aaditya Bagga's avatar
Aaditya Bagga committed
19 20
_Cnvp=${_gentoo_uri}/x11-drivers/nvidia-drivers/files/nvidia-persistenced.conf
_Invp=${_gentoo_uri}/x11-drivers/nvidia-drivers/files/nvidia-persistenced.init
Aaditya Bagga's avatar
Aaditya Bagga committed
21 22 23
_Cvgl=${_gentoo_uri}/x11-misc/virtualgl/files/vgl.confd-r2
_Ivgl=${_gentoo_uri}/x11-misc/virtualgl/files/vgl.initd-r3
_Svgl=${_gentoo_uri}/x11-misc/virtualgl/files/vgl-helper.sh
Aaditya Bagga's avatar
Aaditya Bagga committed
24 25

# install
26 27 28 29 30 31 32 33 34
install -Dm755 "${_Inv}" "${DESTDIR}/${SYSCONFDIR}/init.d/nvidia-smi"
install -Dm644 "${_Cnvp}" "${DESTDIR}/${SYSCONFDIR}/conf.d/nvidia-persistenced"
install -Dm755 "${_Invp}" "${DESTDIR}/${SYSCONFDIR}/init.d/nvidia-persistenced"
install -Dm644 "${_Cvgl}" "${DESTDIR}/${SYSCONFDIR}/conf.d/vgl"
install -Dm755 "${_Ivgl}" "${DESTDIR}/${SYSCONFDIR}/init.d/vgl"
install -Dm755 "${_Svgl}" "${DESTDIR}/usr/lib${LIBDIRSUFFIX}/vgl-helper.sh"
install -dm750 "${DESTDIR}/var/lib/VirtualGL"
install -Dm644 "${_Cbumb}" "${DESTDIR}/${SYSCONFDIR}/conf.d/bumblebee"
install -Dm755 "${_Ibumb}" "${DESTDIR}/${SYSCONFDIR}/init.d/bumblebee"