Magellan Linux

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

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

revision 80 by niro, Wed Jun 1 15:50:56 2005 UTC revision 166 by niro, Fri Jul 29 14:18:41 2005 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2    
3  # mage upgrade  # mage upgrade
4  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mageupgrade.sh,v 1.8 2005-06-01 15:50:56 niro Exp $  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mageupgrade.sh,v 1.9 2005-07-29 14:18:41 niro Exp $
5    
6  # some default vars  # some default vars
7  : ${MLIBDIR=/usr/lib/mage}  : ${MLIBDIR=/usr/lib/mage}
# Line 24  for directory in ${INSTALLDB}/* Line 24  for directory in ${INSTALLDB}/*
24  do  do
25   # supress virtuals and fake packages or files   # supress virtuals and fake packages or files
26   x=$(basename ${directory})   x=$(basename ${directory})
27   if [ ${x} = fake ] ||   if [ ${x} = virtual ] ||
  [ ${x} = virtual ] ||  
28   [ ${x} = virtuals ] ||   [ ${x} = virtuals ] ||
29   [ ${x} = virtuals.old ] ||   [ ${x} = virtuals.old ] ||
30   [ ! -d ${directory} ]   [ ! -d ${directory} ]
# Line 43  do Line 42  do
42    
43   # check if there is any higher version in mage db   # check if there is any higher version in mage db
44    
45   #needed packages may have ben renamed ??   # needed packages may have been renamed ??
46   if [ -d ${MAGEDIR}/${PCAT}/${PNAME} ]   if [ -d ${MAGEDIR}/${PCAT}/${PNAME} ]
47   then   then
48   CATEGORIE=${PCAT} MAGENAME=${PNAME} get_highest_magefile &> /dev/null   CATEGORIE=${PCAT} MAGENAME=${PNAME} get_highest_magefile &> /dev/null
49    
50   #compare them   # compare them
51   if [[ $(basename ${HIGHEST_MAGEFILE} .mage) > ${PNAME}-${PVER}-${PBUILD} ]]   if [[ $(basename ${HIGHEST_MAGEFILE} .mage) > ${PNAME}-${PVER}-${PBUILD} ]]
52   then   then
53   UPGRADE_LIST="${UPGRADE_LIST} ${PNAME}"   UPGRADE_LIST="${UPGRADE_LIST} ${PNAME}"
# Line 63  do Line 62  do
62   fi   fi
63   fi   fi
64    
65   #unset some vars for shure   # unset some vars for sure
66   unset x   unset x
67   unset PNAME   unset PNAME
68   unset PVER   unset PVER
# Line 99  echo "Press any key to continue or [CTRL Line 98  echo "Press any key to continue or [CTRL
98  echo  echo
99  read  read
100    
101  #now run the update  # now run the update
102  for package in ${UPGRADE_LIST}  for package in ${UPGRADE_LIST}
103  do  do
104   if [[ ${SRCINSTALL} = false ]]   if [[ ${SRCINSTALL} = false ]]
# Line 108  do Line 107  do
107   else   else
108   /sbin/mage srcinstall ${package} || exit 1   /sbin/mage srcinstall ${package} || exit 1
109   fi   fi
110    
111   if [[ ${DEBUG} = true ]]   if [[ ${DEBUG} = true ]]
112   then   then
113   echo "Installation of ${package} completed."   echo "Installation of ${package} completed."
# Line 122  do Line 121  do
121   else   else
122   MAGE_UNINSTALL_TIMEOUT=0 /sbin/mage uninstall ${package} || exit 1   MAGE_UNINSTALL_TIMEOUT=0 /sbin/mage uninstall ${package} || exit 1
123   fi   fi
124    
125   if [[ ${DEBUG} = true ]]   if [[ ${DEBUG} = true ]]
126   then   then
127   echo "Uninstallation of ${package} completed."   echo "Uninstallation of ${package} completed."
128   echo "Press any key to continue ..."   echo "Press any key to continue ..."
129   read   read
130   fi   fi
131    
132   #resource /etc/profile   # resource /etc/profile
133   source /etc/profile   source /etc/profile
134  done  done
135    

Legend:
Removed from v.80  
changed lines
  Added in v.166