Commit 412d617f authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpmurl: cleanup code

parent bc462e98
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
. `dirname $0`/../share/eterbuild/functions/common . `dirname $0`/../share/eterbuild/functions/common
load_mod rpm web load_mod rpm web
PAGEURL="http://sisyphus.ru/srpm/Sisyphus"
############################# #############################
Usage="Usage: $name [-c -f -p -s] spec or package..." Usage="Usage: $name [-c -f -p -s] spec or package..."
...@@ -88,7 +90,6 @@ get_pkginfo() ...@@ -88,7 +90,6 @@ get_pkginfo()
fi fi
} }
PAGEURL="http://sisyphus.ru/srpm/Sisyphus"
get_pagepkginfo() get_pagepkginfo()
{ {
local i=${1} local i=${1}
...@@ -126,16 +127,21 @@ do ...@@ -126,16 +127,21 @@ do
if [ -n "$ABOUTDIR" ] ; then if [ -n "$ABOUTDIR" ] ; then
RPM_URL=`dirname $SOURCE` RPM_URL=`dirname $SOURCE`
fi fi
[ "$RPM_URL" = "(none)" ] && RPM_URL=""
if [ -z "${RPM_URL}" ] ; then
warning "Cannot get package URL, open from $PAGEURL"
get_pagepkginfo $i
fi
fi fi
test -z "$ABOUTDIR" && test -z "${RPM_URL}" && fatal "Cannot get package Url from spec $i"
if [ -z "$CHECKONLY" ] ; then if [ -z "$CHECKONLY" ] ; then
if [ -n "$RPM_URL" ] && [ "$RPM_URL" != "(none)" ] ; then
echog "Opening URL '$RPM_URL' with browser '$BROWSER'" echog "Opening URL '$RPM_URL' with browser '$BROWSER'"
$BROWSER $RPM_URL & $BROWSER $RPM_URL &
else continue
echog "The package '$i' has not URL"
fi fi
else
# Check package URL
if [ -z "$PARALL" ] ; then if [ -z "$PARALL" ] ; then
echog -n "Checking URL '$RPM_URL' from package $i ..." echog -n "Checking URL '$RPM_URL' from package $i ..."
$GET $RPM_URL -s -d $GET $RPM_URL -s -d
...@@ -148,5 +154,4 @@ do ...@@ -148,5 +154,4 @@ do
fi fi
) & ) &
fi fi
fi
done done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment