diff options
author | Erich Eckner <git@eckner.net> | 2018-01-07 20:23:53 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-01-07 20:23:53 +0100 |
commit | 36abfb0bbdda9c8150498d73feebf7fcd999556c (patch) | |
tree | ee1de94d735bfa4b61b188b54ea291fc49cd7841 | |
parent | 64d9afd81d9f37ca5343a97c1c39fbf42da7629c (diff) | |
download | packages-36abfb0bbdda9c8150498d73feebf7fcd999556c.tar.xz |
extra/nvidia-340xx-utils: automatically determine index of source which should be replaced
-rw-r--r-- | extra/nvidia-340xx-utils/PKGBUILD | 9 |
1 files changed, 7 insertions, 2 deletions
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' |