587 |
local dest |
local dest |
588 |
local verbose="-v" |
local verbose="-v" |
589 |
|
|
590 |
# check for busybox as it doesn'tz support 'ln -v' |
# check for busybox as it doesn't support 'ln -v' |
591 |
[[ $(readlink $(which ln)) = */busybox ]] && verbose="" |
[[ $(readlink $(which ln)) = */busybox ]] && verbose="" |
592 |
|
|
593 |
[[ -z $1 ]] && die "No file given" |
[[ -z $1 ]] && die "No file given" |
636 |
# recursive |
# recursive |
637 |
if [[ $1 = -r ]] || [[ $1 = -R ]] |
if [[ $1 = -r ]] || [[ $1 = -R ]] |
638 |
then |
then |
639 |
opts="--recursive" |
opts="-R" |
640 |
source="$2" |
source="$2" |
641 |
dest="$3" |
dest="$3" |
642 |
fi |
fi |
644 |
# recursive |
# recursive |
645 |
if [[ $1 = -rf ]] || [[ $1 = -fr ]] || [[ $1 = -Rf ]] || [[ $1 = -fR ]] |
if [[ $1 = -rf ]] || [[ $1 = -fr ]] || [[ $1 = -Rf ]] || [[ $1 = -fR ]] |
646 |
then |
then |
647 |
opts="--recursive --force" |
opts="-R -f" |
648 |
source="$2" |
source="$2" |
649 |
dest="$3" |
dest="$3" |
650 |
fi |
fi |
664 |
# force |
# force |
665 |
if [[ $1 = -f ]] |
if [[ $1 = -f ]] |
666 |
then |
then |
667 |
opts="--force" |
opts="-f" |
668 |
source="$2" |
source="$2" |
669 |
dest="$3" |
dest="$3" |
670 |
fi |
fi |
710 |
# recursive |
# recursive |
711 |
if [[ $1 = -r ]] || [[ $1 = -R ]] |
if [[ $1 = -r ]] || [[ $1 = -R ]] |
712 |
then |
then |
713 |
local recursive="--recursive" |
local recursive="-R" |
714 |
local owner="$2" |
local owner="$2" |
715 |
local path="$3" |
local path="$3" |
716 |
fi |
fi |
730 |
# recursive |
# recursive |
731 |
if [[ $1 = -r ]] || [[ $1 = -R ]] |
if [[ $1 = -r ]] || [[ $1 = -R ]] |
732 |
then |
then |
733 |
local recursive="--recursive" |
local recursive="-R" |
734 |
local posix="$2" |
local posix="$2" |
735 |
local path="$3" |
local path="$3" |
736 |
fi |
fi |