summaryrefslogtreecommitdiffstats
path: root/scripts/makepkg.sh.in
diff options
context:
space:
mode:
authorEric Bélanger <snowmaniscool@gmail.com>2011-06-26 21:13:48 +0200
committerDan McGee <dan@archlinux.org>2011-08-10 02:01:37 +0200
commitc36dbf97118d8098ccf124b6299ff958a289d3c4 (patch)
tree807107da0a29876997873f0d37acd484c4c75da8 /scripts/makepkg.sh.in
parent6b57118c15c6ba60fd84e72ab1ec32bad7f7f7de (diff)
downloadpacman-c36dbf97118d8098ccf124b6299ff958a289d3c4.tar.gz
pacman-c36dbf97118d8098ccf124b6299ff958a289d3c4.tar.xz
Remove -f option from ln for POSIX compliance
Fixes FS#24893. Conflicts: scripts/makepkg.sh.in scripts/repo-add.sh.in Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org> (cherry picked from commit 51ed7dff0d30a5dcb73ce271e5d02bdb0d119cb9)
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r--scripts/makepkg.sh.in13
1 files changed, 8 insertions, 5 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 8fa64f7b..3ace9450 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -509,7 +509,8 @@ download_sources() {
local file=$(get_filepath "$netfile" || true)
if [[ -n "$file" ]]; then
msg2 "$(gettext "Found %s")" "${file##*/}"
- ln -sf "$file" "$srcdir/"
+ rm -f "$srcdir/$file"
+ ln -s "$file" "$srcdir/"
continue
fi
@@ -877,8 +878,8 @@ tidy_install() {
# update symlinks to this manpage
find ${MAN_DIRS[@]} -lname "$file" 2>/dev/null |
while read link ; do
- rm -f "$link"
- ln -sf "${file}.gz" "${link}.gz"
+ rm -f "$link" "${link}.gz"
+ ln -s "${file}.gz" "${link}.gz"
done
# check file still exists (potentially already compressed due to hardlink)
@@ -1087,7 +1088,8 @@ create_package() {
fi
if (( ! ret )) && [[ ! "$PKGDEST" -ef "${startdir}" ]]; then
- ln -sf "${pkg_file}" "${pkg_file/$PKGDEST/$startdir}"
+ rm -f "${pkg_file/$PKGDEST/$startdir}"
+ ln -s "${pkg_file}" "${pkg_file/$PKGDEST/$startdir}"
ret=$?
fi
@@ -1169,7 +1171,8 @@ create_srcpackage() {
fi
if (( ! ret )) && [[ ! "$SRCPKGDEST" -ef "${startdir}" ]]; then
- ln -sf "${pkg_file}" "${pkg_file/$SRCPKGDEST/$startdir}"
+ rm -f "${pkg_file/$SRCPKGDEST/$startdir}"
+ ln -s "${pkg_file}" "${pkg_file/$SRCPKGDEST/$startdir}"
ret=$?
fi