summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/makepkg.sh.in13
-rw-r--r--scripts/repo-add.sh.in5
2 files changed, 11 insertions, 7 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
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index 02ab389c..3d58d857 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -525,8 +525,9 @@ if (( success )); then
[[ -f $tmpdir/$filename ]] && mv "$tmpdir/$filename" "$REPO_DB_FILE"
dblink="${REPO_DB_FILE%.tar.*}"
target=${REPO_DB_FILE##*/}
- ln -sf "$target" "$dblink" 2>/dev/null || \
- ln -f "$target" "$dblink" 2>/dev/null || \
+ rm -f "$dblink"
+ ln -s "$target" "$dblink" 2>/dev/null || \
+ ln "$target" "$dblink" 2>/dev/null || \
cp "$REPO_DB_FILE" "$dblink"
else
msg "$(gettext "No packages modified, nothing to do.")"