From 1d71079c5b57af2feb53fbfa98f93122a32ca154 Mon Sep 17 00:00:00 2001 From: Sebastian Nowicki Date: Wed, 21 May 2008 01:51:38 +0800 Subject: Replace usage of "cp -s" with the more portable "ln -s" The "-s" argument does not exist on BSD, and neither does "--remove-destination". This patch replaces the calls to "cp -s --remove-destination" with the equivalent "rm -f" and "ln -s" calls, in order to increase portability. Signed-off-by: Sebastian Nowicki Signed-off-by: Xavier Chantry Signed-off-by: Dan McGee --- scripts/makepkg.sh.in | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index cc44c68d..273bc0ab 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -435,11 +435,13 @@ download_sources() { local file=$(strip_url "$netfile") if [ -f "$startdir/$file" ]; then msg2 "$(gettext "Found %s in build dir")" "$file" - cp -s --remove-destination "$startdir/$file" "$srcdir/" + rm -f "$srcdir/$file" + ln -s "$startdir/$file" "$srcdir/" continue elif [ -f "$SRCDEST/$file" ]; then msg2 "$(gettext "Using cached copy of %s")" "$file" - cp -s --remove-destination "$SRCDEST/$file" "$srcdir/" + rm -f "$srcdir/$file" + ln -s "$SRCDEST/$file" "$srcdir/" continue fi @@ -464,7 +466,8 @@ download_sources() { if echo "$dlclient" | grep -q "%o" ; then mv -f "$SRCDEST/$file.part" "$SRCDEST/$file" fi - cp -s --remove-destination "$SRCDEST/$file" "$srcdir/" + rm -f "$srcdir/$file" + ln -s "$SRCDEST/$file" "$srcdir/" done popd &>/dev/null -- cgit v1.2.3-24-g4f1b