Magellan Linux

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

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

revision 40 by niro, Thu Jan 6 23:28:28 2005 UTC revision 167 by niro, Fri Jul 29 14:28:43 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-r10  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage3.sh,v 1.15 2005-07-29 14:28:43 niro Exp $
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-r10  MAGEVERSION=0.3.6-r19
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 19  COLGREEN="\033[1;6m\033[32m" Line 19  COLGREEN="\033[1;6m\033[32m"
19  COLBLUE="\033[1;6m\033[34m"  COLBLUE="\033[1;6m\033[34m"
20  COLDEFAULT="\033[0m"  COLDEFAULT="\033[0m"
21    
22    # default path
23    PATH="${PATH}:${MLIBDIR}"
24    
25  ##functions  ##functions
26  if [ -f /etc/mage.rc ]  if [ -f /etc/mage.rc ]
# Line 150  register_virtual_pkg(){ Line 152  register_virtual_pkg(){
152   unset DB_VIRTUAL_NAME DB_PKG_NAME   unset DB_VIRTUAL_NAME DB_PKG_NAME
153   rm ${BUILDDIR}/virtuals/virtuals.${PKGNAME/-${ARCH}/}   rm ${BUILDDIR}/virtuals/virtuals.${PKGNAME/-${ARCH}/}
154   fi   fi
155    
156   if [ -n "${PROVIDE}" ]   if [ -n "${PROVIDE}" ]
157   then   then
158   local my_pgk   # wander through all provides
159   #cut arch   local my_provides
160   my_pkg=${PKGNAME/-${ARCH}/}   for my_provides in ${PROVIDE}
161   #cut version & build   do
162   my_pkg=${my_pkg%-*-*}   local my_pgk
163     #cut arch
164   virtuals_add ${PROVIDE} ${CATEGORIE}/${my_pkg}   my_pkg=${PKGNAME/-${ARCH}/}
165     #cut version & build
166     my_pkg=${my_pkg%-*-*}
167    
168     virtuals_add ${my_provides} ${CATEGORIE}/${my_pkg}
169     done
170   unset PROVIDE   unset PROVIDE
171     unset my_provides
172   fi   fi
173  }  }
174    
# Line 185  unregister_virtual_pkg(){ Line 192  unregister_virtual_pkg(){
192   do   do
193   # continue if not a directory,   # continue if not a directory,
194   # or the same PNAME-PVER-PBUILD   # or the same PNAME-PVER-PBUILD
195   if [ ! -d "${directory}" ]   if [ ! -d "${directory}" ]
196   then   then
197   continue   continue
198   fi   fi
# Line 201  unregister_virtual_pkg(){ Line 208  unregister_virtual_pkg(){
208   done   done
209    
210   #virtuals_del ${PROVIDE} ${CATEGORIE}/${my_pkg}   #virtuals_del ${PROVIDE} ${CATEGORIE}/${my_pkg}
211    
212   #my_pkg has already the categorie -> ex my_pkg=x11-base/xfree   # wander through all provides
213   virtuals_del ${PROVIDE} ${my_pkg}   local my_provides
214     for my_provides in ${PROVIDE}
215     do
216     #my_pkg has already the categorie -> ex my_pkg=x11-base/xfree
217     virtuals_del ${my_provides} ${my_pkg}
218     done
219    
220   unset PROVIDE   unset PROVIDE
221     unset my_provides
222   fi   fi
223  }  }
224    
# Line 513  case "$1" in Line 526  case "$1" in
526   unset preinstall   unset preinstall
527   unset postinstall   unset postinstall
528    
529     #then source an evtl new generated profile
530     [ -e /etc/profile ] && source /etc/profile
531    
532   #than install   #than install
533   MY_CAT_FIX="$(dirname ${i})"   MY_CAT_FIX="$(dirname ${i})"
534   CATEGORIE="$(basename ${MY_CAT_FIX%/*})"   CATEGORIE="$(basename ${MY_CAT_FIX%/*})"
# Line 551  case "$1" in Line 567  case "$1" in
567   unset preinstall   unset preinstall
568   unset postinstall   unset postinstall
569    
570     #then source an evtl new generated profile
571     [ -e /etc/profile ] && source /etc/profile
572    
573   #than srcinstall   #than srcinstall
574   MY_CAT_FIX="$(dirname ${i})"   MY_CAT_FIX="$(dirname ${i})"
575   CATEGORIE="$(basename ${MY_CAT_FIX%/*})"   CATEGORIE="$(basename ${MY_CAT_FIX%/*})"

Legend:
Removed from v.40  
changed lines
  Added in v.167