Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/makepkg.sh.in
diff options
context:
space:
mode:
authorEric Bélanger <snowmaniscool@gmail.com>2011-06-26 15:13:48 -0400
committerDan McGee <dan@archlinux.org>2011-06-27 09:24:41 -0500
commit51ed7dff0d30a5dcb73ce271e5d02bdb0d119cb9 (patch)
tree0a7d2a4540d3a226cfec30c234e67d71b4529c16 /scripts/makepkg.sh.in
parentf5dc5c46e0cf212c32ed149e22331f99764355c4 (diff)
Remove -f option from ln for POSIX compliance
Fixes FS#24893. 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>
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r--scripts/makepkg.sh.in18
1 files changed, 12 insertions, 6 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 8d082a26..ed5cdef7 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -518,7 +518,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
@@ -878,8 +879,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)
@@ -1187,9 +1188,13 @@ create_package() {
create_signature "$pkg_file"
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=$?
- [[ -f $pkg_file.sig ]] && ln -sf "$pkg_file.sig" "${pkg_file/$PKGDEST/$startdir}.sig"
+ if [[ -f $pkg_file.sig ]]; then
+ rm -f "${pkg_file/$PKGDEST/$startdir}.sig"
+ ln -s "$pkg_file.sig" "${pkg_file/$PKGDEST/$startdir}.sig"
+ fi
fi
if (( ret )); then
@@ -1276,7 +1281,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