index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Eli Schwartz <eschwartz@archlinux.org> | 2018-05-28 23:14:03 -0400 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2019-01-22 09:38:21 +1000 |
commit | ac0e21a6df65c3770920be39b3fe14d8b49f637b (patch) | |
tree | 11ae21146559e9bebe0222b3ea102f58450458d3 /scripts/libmakepkg/util | |
parent | 1b9e358f1d7ff806c62a7170f57342dd0e2338bf (diff) |
-rw-r--r-- | scripts/libmakepkg/util/source.sh.in | 14 |
diff --git a/scripts/libmakepkg/util/source.sh.in b/scripts/libmakepkg/util/source.sh.in index 17e44664..faa7061b 100644 --- a/scripts/libmakepkg/util/source.sh.in +++ b/scripts/libmakepkg/util/source.sh.in @@ -41,10 +41,12 @@ get_protocol() { if [[ $1 = *://* ]]; then # strip leading filename local proto="${1#*::}" - printf "%s\n" "${proto%%://*}" + proto="${proto%%://*}" + # strip proto+uri:// + printf "%s\n" "${proto%%+*}" elif [[ $1 = *lp:* ]]; then local proto="${1#*::}" - printf "%s\n" "${proto%%lp:*}" + printf "%s\n" "${proto%%+lp:*}" else printf "%s\n" local fi @@ -63,15 +65,15 @@ get_filename() { local proto=$(get_protocol "$netfile") case $proto in - bzr*|git*|hg*|svn*) + bzr|git|hg|svn) filename=${netfile%%#*} filename=${filename%%\?*} filename=${filename%/} filename=${filename##*/} - if [[ $proto = bzr* ]]; then + if [[ $proto = bzr ]]; then filename=${filename#*lp:} fi - if [[ $proto = git* ]]; then + if [[ $proto = git ]]; then filename=${filename%%.git*} fi ;; @@ -89,7 +91,7 @@ get_filepath() { local proto="$(get_protocol "$1")" case $proto in - bzr*|git*|hg*|svn*) + bzr|git|hg|svn) if [[ -d "$startdir/$file" ]]; then file="$startdir/$file" elif [[ -d "$SRCDEST/$file" ]]; then |