Commit d4479c117ce240b00ca78845f646ed4e1c5b2411

Authored by Silvan Calarco
1 parent fcb13665a0
Exists in master and in 1 other branch milestone3

openmamba-netsrpms: only run curl to check version for specified component, not all

Showing 3 changed files with 23 additions and 12 deletions Side-by-side Diff

... ... @@ -2,14 +2,18 @@
2 2 SRPMVERSION["b43-firmware"]=4.150.10.5
3 3 SRPMRELEASE["b43-firmware"]=1mamba
4 4 # flashplugin
5   -SRPMVERSION["flashplugin"]="`curl --max-time 20 -s http://www.adobe.com/software/flash/about/ | grep -A2 "Linux" | tail -n1 | sed -e 's/[[:space:]]*<[^>][^>]*>//g;s/[[:space:]]//' 2>/dev/null`"
6   -SRPMRELEASE["flashplugin"]=1mamba
  5 +if [ ! "$SRPMCHECK" -o "$SRPMCHECK" = "flashplugin" ]; then
  6 + SRPMVERSION["flashplugin"]="`curl --max-time 20 -s http://www.adobe.com/software/flash/about/ | grep -A2 "Linux" | tail -n1 | sed -e 's/[[:space:]]*<[^>][^>]*>//g;s/[[:space:]]//' 2>/dev/null`"
  7 + SRPMRELEASE["flashplugin"]=1mamba
  8 +fi
7 9 # msttcorefonts
8 10 SRPMVERSION["msttcorefonts"]=1.3
9 11 SRPMRELEASE["msttcorefonts"]=7mamba
10 12 # skype
11   -SRPMVERSION["skype"]="`curl --max-time 20 -sLI "http://www.skype.com/go/getskype-linux-beta-dynamic"|grep "linux/skype-"|sed "s|.*skype-\(.*\)\.tar\..*|\1|"|grep -v "\.\.0\." 2>/dev/null`"
12   -SRPMRELEASE["skype"]=2mamba
  13 +if [ ! "$SRPMCHECK" -o "$SRPMCHECK" = "skype" ]; then
  14 + SRPMVERSION["skype"]="`curl --max-time 20 -sLI "http://www.skype.com/go/getskype-linux-beta-dynamic"|grep "linux/skype-"|sed "s|.*skype-\(.*\)\.tar\..*|\1|"|grep -v "\.\.0\." 2>/dev/null`"
  15 + SRPMRELEASE["skype"]=2mamba
  16 +fi
13 17 # spotify
14 18 if [ "`uname -m`" == "x86_64" ]; then
15 19 SRPMVERSION["spotify"]=20150629
16 20  
17 21  
... ... @@ -18,15 +22,21 @@
18 22 fi
19 23 SRPMRELEASE["spotify"]=1mamba
20 24 # sun-java7
21   -SRPMVERSION["sun-java7"]="`curl --max-time 20 -s http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html|grep "Linux x86.*i586.tar.gz"|tail -n1|sed "s|.*/java/jdk/\(.*\)/jdk-.*|\1|;s|-|_|" 2>/dev/null`"
22   -SRPMRELEASE["sun-java7"]=1mamba
  25 +if [ ! "$SRPMCHECK" -o "$SRPMCHECK" = "sun-java7" ]; then
  26 + SRPMVERSION["sun-java7"]="`curl --max-time 20 -s http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html|grep "Linux x86.*i586.tar.gz"|tail -n1|sed "s|.*/java/jdk/\(.*\)/jdk-.*|\1|;s|-|_|" 2>/dev/null`"
  27 + SRPMRELEASE["sun-java7"]=1mamba
  28 +fi
23 29 # virtualbox-extension-pack
24   -SRPMVERSION["virtualbox-extension-pack"]="`rpm -q VirtualBox 2>/dev/null| cut -d- -f2`"
25   -SRPMRELEASE["virtualbox-extension-pack"]=1mamba
  30 +if [ ! "$SRPMCHECK" -o "$SRPMCHECK" = "virtualbox-extension-pack" ]; then
  31 + SRPMVERSION["virtualbox-extension-pack"]="`rpm -q VirtualBox 2>/dev/null| cut -d- -f2`"
  32 + SRPMRELEASE["virtualbox-extension-pack"]=1mamba
  33 +fi
26 34 # win32codecs
27 35 SRPMVERSION["win32codecs"]=20110131
28 36 SRPMRELEASE["win32codecs"]=1mamba
29 37 # chromium-pepper-flash
30   -SRPMVERSION["chromium-pepper-flash"]="`curl --max-time 20 -s "http://googlechromereleases.blogspot.it/" | grep -i -m 1 "stable channel has been updated to" | sed "s|.*updated to \([0-9.]*\) .*|\1|" 2>/dev/null`"
31   -SRPMRELEASE["chromium-pepper-flash"]=1mamba
  38 +if [ ! "$SRPMCHECK" -o "$SRPMCHECK" = "chromium-pepper-flash" ]; then
  39 + SRPMVERSION["chromium-pepper-flash"]="`curl --max-time 20 -s "http://googlechromereleases.blogspot.it/" | grep -i -m 1 "stable channel has been updated to" | sed "s|.*updated to \([0-9.]*\) .*|\1|" 2>/dev/null`"
  40 + SRPMRELEASE["chromium-pepper-flash"]=1mamba
  41 +fi
1   -SRPMVERSION["sun-java7"]="`curl -s http://www.oracle.com/technetwork/java/javase/downloads/jdk7-arm-downloads-2187468.html|grep "Linux ARM.*arm-vfp-sflt.tar.gz"|tail -n1|sed "s|.*/java/jdk/\(.*\)/jdk-.*||;s|-|_|" 2>/dev/null`"
  1 +SRPMVERSION["sun-java7"]="`curl --max-time 20 -s http://www.oracle.com/technetwork/java/javase/downloads/jdk7-arm-downloads-2187468.html|grep "Linux ARM.*arm-vfp-sflt.tar.gz"|tail -n1|sed "s|.*/java/jdk/\(.*\)/jdk-.*||;s|-|_|" 2>/dev/null`"
2 2 SRPMRELEASE["sun-java7"]=1mamba
openmamba-update/openmamba-netsrpms
... ... @@ -44,9 +44,10 @@
44 44 }
45 45  
46 46 declare -A SRPMVERSION SRPMRELEASE
47   -. /etc/sysconfig/netsrpminstall || exit 1
48 47  
49 48 for pckname in $PACKAGES; do
  49 + export SRPMCHECK="$pckname"
  50 + . /etc/sysconfig/netsrpminstall || exit 1
50 51  
51 52 SRPM_PATH=$DISTRO_SRPMS_DIR/${pckname}
52 53 SPEC_PATHNAME=$SRPM_PATH/${pckname}.spec