Magellan Linux

Diff of /branches/mage-next/src/mage4.functions.sh

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

revision 2224 by niro, Wed Oct 16 07:46:58 2013 UTC revision 2270 by niro, Fri Oct 25 07:16:09 2013 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2  # Magellan Linux Installer Functions (mage.functions.sh)  # Magellan Linux Installer Functions (mage.functions.sh)
3  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage4.functions.sh,v 1.38 2008-10-05 10:32:24 niro Exp $  # $Id$
4    
5  COLRED="\033[1;6m\033[31m"  COLRED="\033[1;6m\033[31m"
6  COLGREEN="\033[1;6m\033[32m"  COLGREEN="\033[1;6m\033[32m"
# Line 46  mchecksum() Line 46  mchecksum()
46   local method   local method
47   local cmd   local cmd
48   local retval   local retval
49     local sum
50     local dest
51    
52   # very basic getops   # very basic getops
53   for i in $*   for i in $*
# Line 72  mchecksum() Line 74  mchecksum()
74   if [[ -d ${rundir} ]]   if [[ -d ${rundir} ]]
75   then   then
76   pushd ${rundir} &> /dev/null   pushd ${rundir} &> /dev/null
77   # be verbose here  
78   ${cmd} -c ${file} #&> /dev/null   # all file must be non-zero
79   retval="$?"   retval=0
80     while read sum dest
81     do
82     if [ ! -s ${dest} ]
83     then
84     echo "${dest}: file is empty ;("
85     retval=127
86     fi
87     done < ${file}
88     if [[ ${retval} != 127 ]]
89     then
90     # be verbose here
91     ${cmd} -c ${file} #&> /dev/null
92     retval="$?"
93     fi
94    
95   popd &> /dev/null   popd &> /dev/null
96   else   else
97   retval=1   retval=1
# Line 1384  convertmirrors() Line 1401  convertmirrors()
1401   output+="${mirror}${addon}/${uri/${scheme}/}"   output+="${mirror}${addon}/${uri/${scheme}/}"
1402   done   done
1403   else   else
1404   output="${uri}"   output="${uri}"
1405   fi   fi
1406    
1407   echo "${output}"   echo "${output}"
# Line 2852  uninstall_packages() Line 2869  uninstall_packages()
2869   pbuild=$(magename2pbuild ${pkg})   pbuild=$(magename2pbuild ${pkg})
2870   can_pcat="${pcat}"   can_pcat="${pcat}"
2871   can_pname="${pname}"   can_pname="${pname}"
2872    
2873   if [ -z "${can_ver_list}" ]   if [ -z "${can_ver_list}" ]
2874   then   then
2875   can_ver_list=" ${pver}-${pbuild}"   can_ver_list=" ${pver}-${pbuild}"

Legend:
Removed from v.2224  
changed lines
  Added in v.2270