summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-01-07 20:32:25 +0100
committerErich Eckner <git@eckner.net>2018-01-07 20:32:25 +0100
commitc1473cf98b4bda7f5e7cc2503c5ef2d8e1412844 (patch)
tree609e7f557b35858172e0f2952b16138a50a20fb5
parent36abfb0bbdda9c8150498d73feebf7fcd999556c (diff)
downloadpackages-c1473cf98b4bda7f5e7cc2503c5ef2d8e1412844.tar.xz
extra/nvidia-utils: automatically determine index of source which should be replaced
-rw-r--r--extra/nvidia-utils/PKGBUILD12
1 files changed, 9 insertions, 3 deletions
diff --git a/extra/nvidia-utils/PKGBUILD b/extra/nvidia-utils/PKGBUILD
index 0bf6c798..7b68f27f 100644
--- a/extra/nvidia-utils/PKGBUILD
+++ b/extra/nvidia-utils/PKGBUILD
@@ -1,6 +1,12 @@
+for ((i=${#source[@]}; i>0; i--)); do
+ if [ "${source[${i}]}" = "http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run" ]; then
+ break;
+ fi
+done
+
+source[${i}]="http://us.download.nvidia.com/XFree86/Linux-x86/${pkgver}/NVIDIA-Linux-x86-${pkgver}.run"
+sha512sums[${i}]='ba9362123a75f85a0a5a9dcc95c06bcb350a8dff2db864db30a73172db44006fa39eee8e23cf959ab2012b61b922d1f0d7ab225329815737819f27d1be300b95'
+
_arch='x86'
_pkg="${_pkg%-no-compat32}"
_pkg="${_pkg/x86_64/x86}"
-
-source[2]="http://us.download.nvidia.com/XFree86/Linux-x86/${pkgver}/NVIDIA-Linux-x86-${pkgver}.run"
-sha512sums[2]='ba9362123a75f85a0a5a9dcc95c06bcb350a8dff2db864db30a73172db44006fa39eee8e23cf959ab2012b61b922d1f0d7ab225329815737819f27d1be300b95'