summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukáš Jirkovský <l.jirkovsky@gmail.com>2015-01-22 20:52:39 +0100
committerAllan McRae <allan@archlinux.org>2015-02-01 12:11:25 +0100
commit8391716b8ab0bb884545bf0e76ab288412f5796e (patch)
tree5815430839c8d84ba6eb3690d4ce8206424a8584
parentaa12a773b8d6ed41878081a69d7a1d089129abef (diff)
downloadpacman-8391716b8ab0bb884545bf0e76ab288412f5796e.tar.gz
pacman-8391716b8ab0bb884545bf0e76ab288412f5796e.tar.xz
makepkg: Set the working copy destination explicitly when cloning in extract_git
This fixes the issue where if the user explicitly set the name of the cloned source to eg. foo.git, the directory name in $SRCDEST would be foo.git as expected, but the clone in $srcdir would be stripped of the .git suffix. Signed-off-by: Lukáš Jirkovský <l.jirkovsky@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--scripts/makepkg.sh.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index da68dc74..f30156a9 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -605,7 +605,7 @@ extract_git() {
exit 1
fi
cd_safe "$srcdir"
- elif ! git clone "$dir"; then
+ elif ! git clone "$dir" "${dir##*/}"; then
error "$(gettext "Failure while creating working copy of %s %s repo")" "${repo}" "git"
plain "$(gettext "Aborting...")"
exit 1