pck-update.in: fix http+git and https+git protocols with preserve_dot_git support
This commit is contained in:
parent
bb706d3ef4
commit
c3e90a144f
@ -1204,8 +1204,17 @@ rpmvars.solve "$fullURL_new" "$SRPM_SPECFILE_WITH_PATH")
|
||||
notify.debug "fullURL_new = $fullURL_new"
|
||||
|
||||
case "$fullURL_new" in
|
||||
git://*|http://*.git/*|https://*.git/*|http+git://*|https+git://*)
|
||||
http+git://*|https+git://*)
|
||||
fullURL_new="${fullURL_new/+git}"
|
||||
[ -e "${source_dir}/${fullURL/*\/}" -a "$force_download" != "1" ] || \
|
||||
git.download \
|
||||
--pck-version "$pck_newver" \
|
||||
--destdir="$source_dir" "$fullURL_new" \
|
||||
--preserve-dot-git 1
|
||||
;;
|
||||
git://*|http://*.git/*|https://*.git/*)
|
||||
fullURL_new="${fullURL_new/+git}"
|
||||
[ -e "${source_dir}/${fullURL/*\/}" -a "$force_download" != "1" ] || \
|
||||
git.download \
|
||||
--pck-version "$pck_newver" \
|
||||
--destdir="$source_dir" "$fullURL_new"
|
||||
@ -2052,13 +2061,6 @@ rpmvars.solve "$fullURL" "$SRPM_SPECFILE_WITH_PATH")
|
||||
notify.debug "fullURL = $fullURL"
|
||||
|
||||
case "$fullURL" in
|
||||
git://*|http://*.git/*|https://*.git/*)
|
||||
fullURL="${fullURL/+git}"
|
||||
[ -e "${source_dir}/${fullURL/*\/}" -a "$force_download" != "1" ] || \
|
||||
git.download \
|
||||
--pck-version "$pck_rpmversion" \
|
||||
--destdir="$source_dir" "$fullURL"
|
||||
;;
|
||||
http+git://*|https+git://*)
|
||||
fullURL="${fullURL/+git}"
|
||||
[ -e "${source_dir}/${fullURL/*\/}" -a "$force_download" != "1" ] || \
|
||||
@ -2067,6 +2069,13 @@ rpmvars.solve "$fullURL" "$SRPM_SPECFILE_WITH_PATH")
|
||||
--destdir="$source_dir" "$fullURL" \
|
||||
--preserve-dot-git 1
|
||||
;;
|
||||
git://*|http://*.git/*|https://*.git/*)
|
||||
fullURL="${fullURL/+git}"
|
||||
[ -e "${source_dir}/${fullURL/*\/}" -a "$force_download" != "1" ] || \
|
||||
git.download \
|
||||
--pck-version "$pck_rpmversion" \
|
||||
--destdir="$source_dir" "$fullURL"
|
||||
;;
|
||||
*) curl.download --options "$curl_options" $sdflag \
|
||||
${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
|
||||
--exit-on-err --filenum="$totfilenum" --destdir="$source_dir" "$fullURL"
|
||||
|
Loading…
Reference in New Issue
Block a user