nvidia-driver-560/create-from-template.sh

20 lines
609 B
Bash
Raw Normal View History

2024-07-24 01:06:18 +02:00
#! /bin/bash
set -e
source ./version.sh
mv ./nvidia-graphics-drivers-#DRIVER_VERSION_MAJOR# ./nvidia-graphics-drivers-"$DRIVER_VERSION_MAJOR"
for f in $(find ./nvidia-graphics-drivers-"$DRIVER_VERSION_MAJOR" -type f)
do
mv "$f" "$(echo "$f" | sed s/#DRIVER_VERSION_MAJOR#/"$DRIVER_VERSION_MAJOR"/)" || true
done
for f in $(find ./nvidia-graphics-drivers-"$DRIVER_VERSION_MAJOR" -type f)
do
sed -i s/#DRIVER_VERSION_MAJOR#/"$DRIVER_VERSION_MAJOR"/g "$f" || true
sed -i s/#DRIVER_VERSION_FULL#/"$DRIVER_VERSION_FULL"/g "$f" || true
sed -i s/#DRIVER_ARCH#/"$DRIVER_ARCH"/g "$f" || true
done