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 |
|
|
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 |
|
|
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 |
} |
} |