Magellan Linux

Diff of /smage/trunk/include/mtools.sminc

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

revision 15 by niro, Sat Jan 2 16:59:51 2010 UTC revision 16 by niro, Sat Jan 2 21:53:20 2010 UTC
# Line 576  minstalllib() Line 576  minstalllib()
576  {  {
577   local file   local file
578   local dest   local dest
579     local lnopts="-v"
580    
581     # check for busybox
582     [[ $(readlink $(which ln)) = */busybox ]] && lnopts=""
583    
584   [[ -z $1 ]] && die "No file given"   [[ -z $1 ]] && die "No file given"
585    
# Line 605  minstalllib() Line 609  minstalllib()
609   # 1. - library.so.1.0.0 -> library.so.1.0   # 1. - library.so.1.0.0 -> library.so.1.0
610   if [ "${file%.*}" != *.so ]   if [ "${file%.*}" != *.so ]
611   then   then
612   ln -v -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*})   ln ${lnopts} -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*})
613   fi   fi
614   # 2. - library.so.1.0.0 -> library.so.1   # 2. - library.so.1.0.0 -> library.so.1
615   if [ "${file%.*.*}" != *.so ]   if [ "${file%.*.*}" != *.so ]
616   then   then
617   ln -v -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*.*})   ln ${lnopts} -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*.*})
618   fi   fi
619  }  }
620    
# Line 732  mlink() Line 736  mlink()
736  {  {
737   local symlink="$1"   local symlink="$1"
738   local pathto="$2"   local pathto="$2"
739     local lnopts="-v"
740    
741     # check for busybox
742     [[ $(readlink $(which ln)) = */busybox ]] && lnopts=""
743    
744   [[ -z ${symlink} ]] && die "No symlink given."   [[ -z ${symlink} ]] && die "No symlink given."
745   [[ -z ${pathto} ]] && die "No path given."   [[ -z ${pathto} ]] && die "No path given."
746    
747   ln -v -snf ${symlink} ${BINDIR}/${pathto} || die   ln ${lnopts} -snf ${symlink} ${BINDIR}/${pathto} || die
748  }  }

Legend:
Removed from v.15  
changed lines
  Added in v.16