Author: kwizart
Update of /cvs/nonfree/rpms/xorg-x11-drv-nvidia/F-19
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv19028/F-19
Modified Files:
nvidia-snapshot.sh
Log Message:
Update nvidia-snapshot to be URL and arches agnostic
Index: nvidia-snapshot.sh
===================================================================
RCS file: /cvs/nonfree/rpms/xorg-x11-drv-nvidia/F-19/nvidia-snapshot.sh,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- nvidia-snapshot.sh 29 Sep 2013 23:27:44 -0000 1.3
+++ nvidia-snapshot.sh 2 Oct 2013 09:25:00 -0000 1.4
@@ -12,19 +12,23 @@
unset CDPATH
pwd=$(pwd)
-version=$(grep Version xorg-x11-drv-nvidia*.spec | cut -f 2 -d ':' | sed 's/
//g')
+nvspec=$(ls ${pwd}/xorg-x11-drv-nvidia*.spec)
+version=$(grep ^Version: ${nvspec} | awk '{print $2}')
+arches="$(grep ^ExclusiveArch: ${nvspec} | awk '{print $2,$3,$4}')"
-for arch in x86 x86_64 ; do
- if [ ! -e NVIDIA-Linux-${arch}-${version}.run ] ; then
- wget -N
ftp://download.nvidia.com/XFree86/Linux-${arch}/${version}/NVIDIA-Linux-$...
- fi
- sh NVIDIA-Linux-${arch}-${version}.run --extract-only --target nvidiapkg-${arch}
-done
-if [ ! -e NVIDIA-Linux-armv7l-gnueabihf-${version}.run ] ; then
- wget -N
ftp://download.nvidia.com/XFree86/Linux-32bit-ARM/${version}/NVIDIA-Linux...
+#Avoid to re-create an existing tarball
+ [ -e ${pwd}/nvidia-kmod-data-${version}.tar.xz ] && exit 0
+
+for arch in ${arches} ; do
+ nvarch=${arch}
+ [ ${arch} == i686 ] && nvarch=x86
+ [ ${arch} == armv7hl ] && nvarch=armv7l-gnueabihf
+ if [ ! -e NVIDIA-Linux-${nvarch}-${version}.run ] ; then
+ spectool --gf -S ${nvspec}
fi
-sh NVIDIA-Linux-armv7l-gnueabihf-${version}.run --extract-only --target
nvidiapkg-armv7hl
+ sh NVIDIA-Linux-${nvarch}-${version}.run --extract-only --target nvidiapkg-${arch}
+done
-tar -cjf nvidia-kmod-data-${version}.tar.bz2 nvidiapkg-*/LICENSE nvidiapkg-*/kernel
+tar Jcf nvidia-kmod-data-${version}.tar.xz nvidiapkg-*/LICENSE nvidiapkg-*/kernel