nvidia-driver-560/create-from-template.sh
Ward from fusion-voyager-3 316837caf1 Turn into template
2024-07-24 02:06:18 +03:00

20 lines
609 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