From c1473cf98b4bda7f5e7cc2503c5ef2d8e1412844 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sun, 7 Jan 2018 20:32:25 +0100 Subject: extra/nvidia-utils: automatically determine index of source which should be replaced --- extra/nvidia-utils/PKGBUILD | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'extra') 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' -- cgit v1.2.3-70-g09d2