From 03ea8ca6a996c02f62d067eb5793aa59fe60ba8f Mon Sep 17 00:00:00 2001 From: Gary van der Merwe Date: Thu, 16 Aug 2012 11:30:34 +0200 Subject: makepkg: Improvements to get_filename: * For any vcs other that git, the fall through resulted in being handled by the code for std url, hence fragments were being left on. * Handle vcs urls than end in a slash correctly, eg http://example.com/project/ Signed-off-by: Gary van der Merwe --- scripts/makepkg.sh.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'scripts') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 7ec523c8..51d3971c 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -237,12 +237,12 @@ get_filename() { case $proto in git*|hg*|svn*) - filename=${netfile##*/} - filename=${filename%%#*} - # fall-through - ;;& - git*) - filename=${filename%%.git*} + filename=${netfile%%#*} + filename=${filename%/} + filename=${filename##*/} + if [[ $proto = git* ]]; then + filename=${filename%%.git*} + fi ;; *) # if it is just an URL, we only keep the last component -- cgit v1.2.3-24-g4f1b