Magellan Linux

Diff of /branches/mage-next/src/smage2.functions.sh.in

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

trunk/mage/usr/lib/mage/smage2.functions.sh revision 2365 by niro, Mon Jan 6 12:56:50 2014 UTC branches/mage-next/src/smage2.functions.sh.in revision 2832 by niro, Fri Sep 19 11:19:35 2014 UTC
# Line 79  print_distrotag() Line 79  print_distrotag()
79   fi   fi
80  }  }
81    
 showversion()  
 {  
  echo -en "Magellan Source Install v${SMAGEVERSION} "  
  echo -e  "-- Niels Rogalla (niro@magellan-linux.de)"  
 }  
   
 die()  
 {  
  xtitleclean  
  echo -e ${COLRED}"Exited ${BASH_SOURCE} at line no ${BASH_LINENO}."${COLDEFAULT}  
  echo "SMAGE failed: $@"  
  exit 1  
 }  
   
 die_pipestatus()  
 {  
  # the status change if we do any parameter declarations!!  
  # dont do this anymore, keep this in mind!  
  #  
  # local pos="$1"  
  # local comment="$2"  
  #  
  # [ ${PIPESTATUS[${pos}]} -ne 0 ] && die "${comment}"  
  #  
  [ ${PIPESTATUS[$1]} -ne 0 ] && die "$2"  
 }  
   
 xtitle()  
 {  
  if [[ ${TERM} = xterm ]]  
  then  
  echo -ne "\033]0;[sMage: $@]\007"  
  fi  
  return 0  
 }  
   
 xtitleclean()  
 {  
  if [[ ${TERM} = xterm ]]  
  then  
  echo -ne "\033]0;\007"  
  fi  
  return 0  
 }  
   
82  syncsmage2()  syncsmage2()
83  {  {
84   xtitle "Updating smage2-script tree ..."   xtitle "Updating smage2-script tree ..."
# Line 225  download_sources() Line 180  download_sources()
180  }  }
181    
182  # dummy function, used if that does not exist in smage file  # dummy function, used if that does not exist in smage file
183    pkg_setup()
184    {
185     echo "no pkg_setup defined; doing nothing ..."
186     return 0
187    }
188    
189    # dummy function, used if that does not exist in smage file
190  src_prepare()  src_prepare()
191  {  {
192   echo "no src_prepare defined; doing nothing ..."   echo "no src_prepare defined; doing nothing ..."
# Line 633  marchdepend() Line 595  marchdepend()
595    
596   if [[ ! -z $(eval echo \$${var}_${ARCH/i*86/x86}) ]]   if [[ ! -z $(eval echo \$${var}_${ARCH/i*86/x86}) ]]
597   then   then
598   echo "\$(eval echo \\\$${var}_\${ARCH/i*86/x86} | tr ';' '\n')"   # evaluate with escape strings for the magefile if called by smage
599     # but do not escape if the smagefile was called by depwalker directly
600     if [[ ${SMAGE_DEPEND} = 1 ]]
601     then
602     eval echo \$${var}_${ARCH/i*86/x86} | tr ';' '\n'
603     else
604     echo "\$(eval echo \\\$${var}_\${ARCH/i*86/x86} | tr ';' '\n')"
605     fi
606   retval=0   retval=0
607   else   else
608   retval=1   retval=1
# Line 651  marchsdepend() Line 620  marchsdepend()
620    
621   if [[ ! -z $(eval echo \$${var}_${ARCH/i*86/x86}) ]]   if [[ ! -z $(eval echo \$${var}_${ARCH/i*86/x86}) ]]
622   then   then
623   echo "\$(eval echo \\\$${var}_\${ARCH/i*86/x86} | tr ';' '\n')"   # evaluate with escape strings for the magefile if called by smage
624     # but do not escape if the smagefile was called by depwalker directly
625     if [[ ${SMAGE_DEPEND} = 1 ]]
626     then
627     eval echo \$${var}_${ARCH/i*86/x86} | tr ';' '\n'
628     else
629     echo "\$(eval echo \\\$${var}_\${ARCH/i*86/x86} | tr ';' '\n')"
630     fi
631   retval=0   retval=0
632   else   else
633   retval=1   retval=1

Legend:
Removed from v.2365  
changed lines
  Added in v.2832