Magellan Linux

Diff of /trunk/mage/usr/lib/mage/mage3.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 24 by niro, Wed Jan 5 05:08:01 2005 UTC revision 33 by niro, Thu Jan 6 02:57:12 2005 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2  # Magellan Linux Installer (mage.sh)  # Magellan Linux Installer (mage.sh)
3  # version: 0.3.6-r8  # version: 0.3.6-r9
4    
5  ##configuration -> mage.rc  ##configuration -> mage.rc
6  #PKGDIR="/usr/src/packages"  #PKGDIR="/usr/src/packages"
# Line 11  PKGSUFFIX="mpk" Line 11  PKGSUFFIX="mpk"
11  MAGENAME="$2"  MAGENAME="$2"
12  #PKGNAME="`basename $2 .mage`"  #PKGNAME="`basename $2 .mage`"
13  MLIBDIR=/usr/lib/mage  MLIBDIR=/usr/lib/mage
14  MAGEVERSION=0.3.6-r8  MAGEVERSION=0.3.6-r9
15    
16  ## nur für tests -> normalerweise in /etc/rc.d/init.d/functions  ## nur für tests -> normalerweise in /etc/rc.d/init.d/functions
17  COLRED="\033[1;6m\033[31m"  COLRED="\033[1;6m\033[31m"
# Line 169  unregister_virtual_pkg(){ Line 169  unregister_virtual_pkg(){
169   if [ -n "${PROVIDE}" ]   if [ -n "${PROVIDE}" ]
170   then   then
171   local my_pgk   local my_pgk
172     local my_cat
173     local directory
174     local x
175    
176   #cut arch   #cut arch
177   my_pkg=${PKGNAME/-${ARCH}/}   my_pkg=${PKGNAME/-${ARCH}/}
178    
179   #cut version & build   #cut version & build
180   my_pkg=${my_pkg%-*-*}   my_pkg=${my_pkg%-*-*}
181     my_cat=$(dirname ${my_pkg})
182    
183     #check if this was the last one or if any other exists
184     for directory in ${INSTALLDB}/${my_cat}/*
185     do
186     # continue if not a directory,
187     # or the same PNAME-PVER-PBUILD
188     if [ ! -d "${directory}" ]
189     then
190     continue
191     fi
192    
193     #check if $directory is the same as $my_pkg
194     x=$(basename ${directory})
195     if [[ ${my_cat}/${x%-*-*} = ${my_pkg} ]]
196     then
197     # break here
198     echo "==== another version of ${my_pkg} exists, not deleting ${VIRTUAL_NAME} ..."
199     return 0
200     fi
201     done
202    
203   #virtuals_del ${PROVIDE} ${CATEGORIE}/${my_pkg}   #virtuals_del ${PROVIDE} ${CATEGORIE}/${my_pkg}
204    
205   #my_pkg has already the categorie -> ex my_pkg=x11-base/xfree   #my_pkg has already the categorie -> ex my_pkg=x11-base/xfree

Legend:
Removed from v.24  
changed lines
  Added in v.33