From 36abfb0bbdda9c8150498d73feebf7fcd999556c Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sun, 7 Jan 2018 20:23:53 +0100 Subject: extra/nvidia-340xx-utils: automatically determine index of source which should be replaced --- extra/nvidia-340xx-utils/PKGBUILD | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'extra/nvidia-340xx-utils') diff --git a/extra/nvidia-340xx-utils/PKGBUILD b/extra/nvidia-340xx-utils/PKGBUILD index 749df98c..f39ace00 100644 --- a/extra/nvidia-340xx-utils/PKGBUILD +++ b/extra/nvidia-340xx-utils/PKGBUILD @@ -2,5 +2,10 @@ _arch='x86' _pkg="${_pkg%-no-compat32}" _pkg="${_pkg/x86_64/x86}" -source[1]="http://us.download.nvidia.com/XFree86/Linux-x86/${pkgver}/NVIDIA-Linux-x86-${pkgver}.run" -sha512sums[1]='8dacd5345a5794e862f4106ab9e8e402defa7883dd176c243d019209b560fe955d7576a13936364c01c5a249f15df58208308c9378c12c3438784376e5fb806c' +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}]='8dacd5345a5794e862f4106ab9e8e402defa7883dd176c243d019209b560fe955d7576a13936364c01c5a249f15df58208308c9378c12c3438784376e5fb806c' -- cgit v1.2.3-70-g09d2