Magellan Linux

Diff of /branches/R11-unstable/include/mtools.sminc

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

revision 4805 by niro, Sun Jan 3 20:24:39 2010 UTC revision 4806 by niro, Sun Jan 3 20:27:59 2010 UTC
# Line 585  minstalllib() Line 585  minstalllib()
585  {  {
586   local file   local file
587   local dest   local dest
588     local verbose="-v"
589    
590     # check for busybox as it doesn'tz support 'ln -v'
591     [[ $(readlink $(which ln)) = */busybox ]] && verbose=""
592    
593   [[ -z $1 ]] && die "No file given"   [[ -z $1 ]] && die "No file given"
594    
# Line 614  minstalllib() Line 618  minstalllib()
618   # 1. - library.so.1.0.0 -> library.so.1.0   # 1. - library.so.1.0.0 -> library.so.1.0
619   if [ "${file%.*}" != *.so ]   if [ "${file%.*}" != *.so ]
620   then   then
621   ln -v -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*})   ln ${verbose} -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*})
622   fi   fi
623   # 2. - library.so.1.0.0 -> library.so.1   # 2. - library.so.1.0.0 -> library.so.1
624   if [ "${file%.*.*}" != *.so ]   if [ "${file%.*.*}" != *.so ]
625   then   then
626   ln -v -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*.*})   ln ${verbose} -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*.*})
627   fi   fi
628  }  }
629    
# Line 741  mlink() Line 745  mlink()
745  {  {
746   local symlink="$1"   local symlink="$1"
747   local pathto="$2"   local pathto="$2"
748     local verbose="-v"
749    
750     # check for busybox as it doesn'tz support 'ln -v'
751     [[ $(readlink $(which ln)) = */busybox ]] && verbose=""
752    
753   [[ -z ${symlink} ]] && die "No symlink given."   [[ -z ${symlink} ]] && die "No symlink given."
754   [[ -z ${pathto} ]] && die "No path given."   [[ -z ${pathto} ]] && die "No path given."
755    
756   ln -v -snf ${symlink} ${BINDIR}/${pathto} || die   ln ${verbose} -snf ${symlink} ${BINDIR}/${pathto} || die
757  }  }

Legend:
Removed from v.4805  
changed lines
  Added in v.4806