Make tests pass on busybox (#912)
-t option to ln is not defined under POSIX and (at least) busybox does not implement it. Rewrite the code to use only POSIX options to ln.
This commit is contained in:
parent
324dbd13cf
commit
5d391cfe9d
|
@ -139,7 +139,7 @@ if [[ -f "$1" ]]; then
|
|||
dest="$target/$(basename \"$1\")"
|
||||
cp "$1" "$dest" && chmod +w "$dest" && touch -r "$1" "$dest"
|
||||
else
|
||||
ln -s -f -t "$target" "$1"
|
||||
ln -sf "$1" "$target/${1##*/}"
|
||||
fi
|
||||
elif [[ -L "$1" && ! -d "$1" ]]; then
|
||||
cp -pR "$1" "$2"
|
||||
|
|
|
@ -216,9 +216,9 @@ def _symlink_to_dir(source, target):
|
|||
mkdir -p ${target}
|
||||
|
||||
if [[ -d $1 ]]; then
|
||||
ln -s -t ${target} $1
|
||||
ln -s "$1" "$target/${1##*/}"
|
||||
elif [[ -f $1 ]]; then
|
||||
ln -s -t ${target} $1
|
||||
ln -s "$1" "$target/${1##*/}"
|
||||
elif [[ -L $1 ]]; then
|
||||
cp --no-target-directory $1 ${target}
|
||||
else
|
||||
|
@ -249,9 +249,9 @@ local target="$2"
|
|||
mkdir -p ${target}
|
||||
|
||||
if [[ -d $1 ]]; then
|
||||
ln -s -t ${target} $1
|
||||
ln -s "$1" "$target/${1##*/}"
|
||||
elif [[ -f $1 ]]; then
|
||||
ln -s -t ${target} $1
|
||||
ln -s "$1" "$target/${1##*/}"
|
||||
elif [[ -L $1 ]]; then
|
||||
cp --no-target-directory $1 ${target}
|
||||
else
|
||||
|
|
|
@ -43,7 +43,7 @@ if [[ "$1" == *.pc || "$1" == *.la || "$1" == *-config || "$1" == *.mk || "$1" =
|
|||
dest="$target/$(basename "$1")"
|
||||
cp "$1" "$dest" && chmod +w "$dest" && touch -r "$1" "$dest"
|
||||
else
|
||||
ln -s -f -t "$target" "$1"
|
||||
ln -sf "$1" "$target/${1##*/}"
|
||||
fi
|
||||
elif [[ -L "$1" && ! -d "$1" ]]; then
|
||||
cp -pR "$1" "$2"
|
||||
|
|
Loading…
Reference in New Issue