nvidia-driver-565/create-from-template.sh
NVIDIA Package Group 3d5cb82734 Initial commit
2024-10-22 17:05:20 +02:00

22 lines
642 B
Bash
Executable File

#! /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
rm -f ./create-from-template.sh