mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
makepkg: Make VCS download functions use get_filename
Make all VCS download functions uses get_filename to get the repo name. In addition, creating a working directory from a Bazaar repository now shows the short-name of the repository, not the full path on disk. I'm not sure if the name of the variable that holds the basename of the local clone should still be `repo`, but I have left the variable name for simplicity. Signed-off-by: Neer Sighted <neersighted@myopera.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
fcdaa46b65
commit
93fa63ee8a
@ -439,6 +439,8 @@ download_bzr() {
|
||||
url=${url##*bzr+}
|
||||
url=${url%%#*}
|
||||
|
||||
local repo=$(get_filename "$netfile")
|
||||
|
||||
local displaylocation="$url"
|
||||
local revision=('-r-1')
|
||||
|
||||
@ -492,12 +494,12 @@ extract_bzr() {
|
||||
local dir=$(get_filepath "$netfile")
|
||||
[[ -z "$dir" ]] && dir="$SRCDEST/$(get_filename "$netfile")"
|
||||
|
||||
msg2 "$(gettext "Creating working copy of %s %s repo...")" "${dir}" "bzr"
|
||||
msg2 "$(gettext "Creating working copy of %s %s repo...")" "${repo}" "bzr"
|
||||
pushd "$srcdir" &>/dev/null
|
||||
rm -rf "${dir##*/}"
|
||||
|
||||
if ! bzr checkout "$dir" --lightweight; then
|
||||
error "$(gettext "Failure while creating working copy of %s %s repo")" "${dir}" "bzr"
|
||||
error "$(gettext "Failure while creating working copy of %s %s repo")" "${repo}" "bzr"
|
||||
plain "$(gettext "Aborting...")"
|
||||
exit 1
|
||||
fi
|
||||
@ -511,9 +513,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+}
|
||||
@ -602,8 +602,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+}
|
||||
@ -677,8 +676,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
|
||||
|
Loading…
Reference in New Issue
Block a user