9 |
mpname() |
mpname() |
10 |
{ |
{ |
11 |
local pname="${PNAME}" |
local pname="${PNAME}" |
12 |
[[ ! -z ${SPLIT_PACKAGE_BASE} ]] && pname ="${SPLIT_PACKAGE_BASE}" |
[[ ! -z ${SPLIT_PACKAGE_BASE} ]] && pname="${SPLIT_PACKAGE_BASE}" |
13 |
|
|
14 |
echo "${pname}" |
echo "${pname}" |
15 |
} |
} |
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 |
|
|
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 |
|
|
664 |
# force |
# force |
665 |
if [[ $1 = -f ]] |
if [[ $1 = -f ]] |
666 |
then |
then |
667 |
opts="--recursive" |
opts="--force" |
668 |
source="$2" |
source="$2" |
669 |
dest="$3" |
dest="$3" |
670 |
fi |
fi |
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 |
} |
} |