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

This commit is contained in:
Silvan Calarco 2016-02-12 11:27:22 +01:00
parent fcb13665a0
commit d4479c117c
3 changed files with 23 additions and 12 deletions

View File

@ -2,14 +2,18 @@
SRPMVERSION["b43-firmware"]=4.150.10.5 SRPMVERSION["b43-firmware"]=4.150.10.5
SRPMRELEASE["b43-firmware"]=1mamba SRPMRELEASE["b43-firmware"]=1mamba
# flashplugin # flashplugin
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`" if [ ! "$SRPMCHECK" -o "$SRPMCHECK" = "flashplugin" ]; then
SRPMRELEASE["flashplugin"]=1mamba 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`"
SRPMRELEASE["flashplugin"]=1mamba
fi
# msttcorefonts # msttcorefonts
SRPMVERSION["msttcorefonts"]=1.3 SRPMVERSION["msttcorefonts"]=1.3
SRPMRELEASE["msttcorefonts"]=7mamba SRPMRELEASE["msttcorefonts"]=7mamba
# skype # skype
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`" if [ ! "$SRPMCHECK" -o "$SRPMCHECK" = "skype" ]; then
SRPMRELEASE["skype"]=2mamba 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`"
SRPMRELEASE["skype"]=2mamba
fi
# spotify # spotify
if [ "`uname -m`" == "x86_64" ]; then if [ "`uname -m`" == "x86_64" ]; then
SRPMVERSION["spotify"]=20150629 SRPMVERSION["spotify"]=20150629
@ -18,14 +22,20 @@ SRPMVERSION["spotify"]=0
fi fi
SRPMRELEASE["spotify"]=1mamba SRPMRELEASE["spotify"]=1mamba
# sun-java7 # sun-java7
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`" if [ ! "$SRPMCHECK" -o "$SRPMCHECK" = "sun-java7" ]; then
SRPMRELEASE["sun-java7"]=1mamba 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`"
SRPMRELEASE["sun-java7"]=1mamba
fi
# virtualbox-extension-pack # virtualbox-extension-pack
SRPMVERSION["virtualbox-extension-pack"]="`rpm -q VirtualBox 2>/dev/null| cut -d- -f2`" if [ ! "$SRPMCHECK" -o "$SRPMCHECK" = "virtualbox-extension-pack" ]; then
SRPMRELEASE["virtualbox-extension-pack"]=1mamba SRPMVERSION["virtualbox-extension-pack"]="`rpm -q VirtualBox 2>/dev/null| cut -d- -f2`"
SRPMRELEASE["virtualbox-extension-pack"]=1mamba
fi
# win32codecs # win32codecs
SRPMVERSION["win32codecs"]=20110131 SRPMVERSION["win32codecs"]=20110131
SRPMRELEASE["win32codecs"]=1mamba SRPMRELEASE["win32codecs"]=1mamba
# chromium-pepper-flash # chromium-pepper-flash
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`" if [ ! "$SRPMCHECK" -o "$SRPMCHECK" = "chromium-pepper-flash" ]; then
SRPMRELEASE["chromium-pepper-flash"]=1mamba 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`"
SRPMRELEASE["chromium-pepper-flash"]=1mamba
fi

View File

@ -1,2 +1,2 @@
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-.*|\1|;s|-|_|" 2>/dev/null`" 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-.*|\1|;s|-|_|" 2>/dev/null`"
SRPMRELEASE["sun-java7"]=1mamba SRPMRELEASE["sun-java7"]=1mamba

View File

@ -44,9 +44,10 @@ function check_if_already_installed() {
} }
declare -A SRPMVERSION SRPMRELEASE declare -A SRPMVERSION SRPMRELEASE
. /etc/sysconfig/netsrpminstall || exit 1
for pckname in $PACKAGES; do for pckname in $PACKAGES; do
export SRPMCHECK="$pckname"
. /etc/sysconfig/netsrpminstall || exit 1
SRPM_PATH=$DISTRO_SRPMS_DIR/${pckname} SRPM_PATH=$DISTRO_SRPMS_DIR/${pckname}
SPEC_PATHNAME=$SRPM_PATH/${pckname}.spec SPEC_PATHNAME=$SRPM_PATH/${pckname}.spec