if [ -x /usr/bin/update-desktop-database ]; then
  ./usr/bin/update-desktop-database -q usr/share/applications
fi

/usr/sbin/nvidia-switch --install

( cd usr/lib ; rm -rf libnvcuvid.so )
( cd usr/lib ; ln -sf libnvcuvid.so.1 libnvcuvid.so )
( cd usr/lib ; rm -rf libOpenCL.so )
( cd usr/lib ; ln -sf libOpenCL.so.1 libOpenCL.so )
( cd usr/lib ; rm -rf libvdpau_nvidia.so )
( cd usr/lib ; ln -sf libvdpau_nvidia.so.340.96 libvdpau_nvidia.so )
( cd usr/lib ; rm -rf libOpenCL.so.1 )
( cd usr/lib ; ln -sf libOpenCL.so.1.0 libOpenCL.so.1 )
( cd usr/lib ; rm -rf libnvidia-cfg.so.1 )
( cd usr/lib ; ln -sf libnvidia-cfg.so.340.96 libnvidia-cfg.so.1 )
( cd usr/lib ; rm -rf libnvidia-tls.so.340.96 )
( cd usr/lib ; ln -sf tls/libnvidia-tls.so.340.96 libnvidia-tls.so.340.96 )
( cd usr/lib ; rm -rf libnvidia-cfg.so )
( cd usr/lib ; ln -sf libnvidia-cfg.so.1 libnvidia-cfg.so )
( cd usr/lib ; rm -rf libcuda.so.1 )
( cd usr/lib ; ln -sf libcuda.so.340.96 libcuda.so.1 )
( cd usr/lib ; rm -rf libnvcuvid.so.1 )
( cd usr/lib ; ln -sf libnvcuvid.so.340.96 libnvcuvid.so.1 )
( cd usr/lib ; rm -rf libOpenCL.so.1.0 )
( cd usr/lib ; ln -sf libOpenCL.so.1.0.0 libOpenCL.so.1.0 )
( cd usr/lib ; rm -rf libcuda.so )
( cd usr/lib ; ln -sf libcuda.so.1 libcuda.so )
