Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-01-07 20:23:53 +0100
committerErich Eckner <git@eckner.net>2018-01-07 20:23:53 +0100
commit36abfb0bbdda9c8150498d73feebf7fcd999556c (patch)
treeee1de94d735bfa4b61b188b54ea291fc49cd7841
parent64d9afd81d9f37ca5343a97c1c39fbf42da7629c (diff)
extra/nvidia-340xx-utils: automatically determine index of source which should be replaced
-rw-r--r--extra/nvidia-340xx-utils/PKGBUILD9
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'