[pacman-dev] [PATCH] Make VCS download functions print correct filename

Neer Sighted neersighted at myopera.com
Wed Feb 27 22:37:22 EST 2013


I've made the VCS download functions print the correct
filename for their clone, as opposed to the last fragment
in the url.
---
 scripts/makepkg.sh.in | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index bd29d73..0facb5e 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -456,9 +456,7 @@ download_git() {
 	local dir=$(get_filepath "$netfile")
 	[[ -z "$dir" ]] && dir="$SRCDEST/$(get_filename "$netfile")"
 
-	local repo=${netfile##*/}
-	repo=${repo%%#*}
-	repo=${repo%%.git*}
+	local repo=$(get_filename "$netfile")
 
 	local url=$(get_url "$netfile")
 	url=${url##*git+}
@@ -536,8 +534,7 @@ download_hg() {
 	local dir=$(get_filepath "$netfile")
 	[[ -z "$dir" ]] && dir="$SRCDEST/$(get_filename "$netfile")"
 
-	local repo=${netfile##*/}
-	repo=${repo%%#*}
+	local repo=$(get_filename "$netfile")
 
 	local url=$(get_url "$netfile")
 	url=${url##*hg+}
@@ -596,8 +593,7 @@ download_svn() {
 	local dir=$(get_filepath "$netfile")
 	[[ -z "$dir" ]] && dir="$SRCDEST/$(get_filename "$netfile")"
 
-	local repo=${netfile##*/}
-	repo=${repo%%#*}
+	local repo=$(get_filename "$netfile")
 
 	local url=$(get_url "$netfile")
 	if [[ $url != svn+ssh* ]]; then
-- 
1.8.1.4



More information about the pacman-dev mailing list