summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorEric Bélanger <snowmaniscool@gmail.com>2010-06-23 01:35:56 -0400
committerDan McGee <dan@archlinux.org>2010-06-24 08:22:55 -0500
commit71330a431040377ae9a37989fcfd43cee7596194 (patch)
tree4e2f9f2c9882a42ae4364390e7c2f42b5d2152ab /scripts
parentc6a94a8d2204cfdec0f782f647903d597b4faf57 (diff)
downloadpacman-71330a431040377ae9a37989fcfd43cee7596194.tar.xz
makepkg: Place source packages symlinks in build dir when SRCPKGDEST is used
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')
-rw-r--r--scripts/makepkg.sh.in12
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index f2ec78e2..71ad9415 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -153,7 +153,7 @@ clean_up() {
# clean up dangling symlinks to packages
for pkg in ${pkgname[@]}; do
- for file in ${pkg}-*-*-${CARCH}${PKGEXT}; do
+ for file in ${pkg}-*-*-${CARCH}{${PKGEXT},${SRCEXT}}; do
if [[ -h $file && ! -e $file ]]; then
rm -f $file
fi
@@ -1126,6 +1126,16 @@ create_srcpackage() {
error "$(gettext "Failed to create source package file.")"
exit 1 # TODO: error code
fi
+
+ if (( ! ret )) && [[ "$SRCPKGDEST" != "${startdir}" ]]; then
+ ln -sf "${pkg_file}" "${pkg_file/$SRCPKGDEST/$startdir}"
+ ret=$?
+ fi
+
+ if (( ret )); then
+ warning "$(gettext "Failed to create symlink to source package file.")"
+ fi
+
cd "${startdir}"
rm -rf "${srclinks}"
}