libmakepkg: Fix git clone command
Commit e017a5975c
introduced the GITFLAGS
environmental variable. While ensuring the default of "--mirror" was
kept, there was a capitalisation mistake made. Handle the default for
GITFLAGS directly in the git clone command.
This commit is contained in:
parent
e017a5975c
commit
184f593168
1 changed files with 1 additions and 4 deletions
|
@ -46,12 +46,9 @@ download_git() {
|
||||||
url=${url%%#*}
|
url=${url%%#*}
|
||||||
url=${url%%\?*}
|
url=${url%%\?*}
|
||||||
|
|
||||||
# Allow overriding of options passed to git clone command, e.g. --filter=blob:none for partial cloning of big repos
|
|
||||||
local gitflags=${GITFLAGS:---mirror}
|
|
||||||
|
|
||||||
if [[ ! -d "$dir" ]] || dir_is_empty "$dir" ; then
|
if [[ ! -d "$dir" ]] || dir_is_empty "$dir" ; then
|
||||||
msg2 "$(gettext "Cloning %s %s repo...")" "${repo}" "git"
|
msg2 "$(gettext "Cloning %s %s repo...")" "${repo}" "git"
|
||||||
if ! git clone $GITFLAGS "$url" "$dir"; then
|
if ! git clone ${GITFLAGS:---mirror} "$url" "$dir"; then
|
||||||
error "$(gettext "Failure while downloading %s %s repo")" "${repo}" "git"
|
error "$(gettext "Failure while downloading %s %s repo")" "${repo}" "git"
|
||||||
plainerr "$(gettext "Aborting...")"
|
plainerr "$(gettext "Aborting...")"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue