1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

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 <garyvdm@gmail.com>
This commit is contained in:
Gary van der Merwe 2012-08-16 11:30:34 +02:00 committed by Dan McGee
parent c926c39b04
commit 03ea8ca6a9

View File

@ -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