Magellan Linux

Annotation of /branches/mage-next/src/up2date/gnome.sh.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2591 - (hide annotations) (download)
Tue Mar 4 08:35:27 2014 UTC (10 years, 2 months ago) by niro
File size: 593 byte(s)
-split function into single includes
1 niro 2591 updatecmd_gnome()
2     {
3     local uri
4     local pname="$1"
5     local mode="$2"
6     local appmajor
7    
8    
9     [[ -z ${pname} ]] && die "give me a \$PNAME"
10    
11     case ${mode} in
12     devel|--devel) mode="devel" ;;
13     *) mode="normal" ;;
14     esac
15    
16     uri="http://ftp.gnome.org/pub/GNOME/sources/${pname}"
17     if [[ ${mode} = devel ]]
18     then
19     appmajor=$(updatecmd "${uri}"/?C=N\;O=D | grep '/' | sed -ne 's|.*]\(.*\)/.*|\1|' -e '1 p')
20     else
21     appmajor=$(updatecmd "${uri}"/?C=N\;O=D | grep '[0-9]\.[0-9]*[02468]/' | sed -ne 's|.*]\(.*\)/.*|\1|' -e '1 p')
22     fi
23    
24     updatecmd ${uri}/${appmajor}/ | grep ]LA | sed 's/.*S-\([0-9\.]*\).*/\1/'
25     }