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"
|
notify.debug "fullURL_new = $fullURL_new"
|
||||||
|
|
||||||
case "$fullURL_new" in
|
case "$fullURL_new" in
|
||||||
git://*|http://*.git/*|https://*.git/*|http+git://*|https+git://*)
|
http+git://*|https+git://*)
|
||||||
fullURL_new="${fullURL_new/+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 \
|
git.download \
|
||||||
--pck-version "$pck_newver" \
|
--pck-version "$pck_newver" \
|
||||||
--destdir="$source_dir" "$fullURL_new"
|
--destdir="$source_dir" "$fullURL_new"
|
||||||
@ -2052,13 +2061,6 @@ rpmvars.solve "$fullURL" "$SRPM_SPECFILE_WITH_PATH")
|
|||||||
notify.debug "fullURL = $fullURL"
|
notify.debug "fullURL = $fullURL"
|
||||||
|
|
||||||
case "$fullURL" in
|
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://*)
|
http+git://*|https+git://*)
|
||||||
fullURL="${fullURL/+git}"
|
fullURL="${fullURL/+git}"
|
||||||
[ -e "${source_dir}/${fullURL/*\/}" -a "$force_download" != "1" ] || \
|
[ -e "${source_dir}/${fullURL/*\/}" -a "$force_download" != "1" ] || \
|
||||||
@ -2067,6 +2069,13 @@ rpmvars.solve "$fullURL" "$SRPM_SPECFILE_WITH_PATH")
|
|||||||
--destdir="$source_dir" "$fullURL" \
|
--destdir="$source_dir" "$fullURL" \
|
||||||
--preserve-dot-git 1
|
--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 \
|
*) curl.download --options "$curl_options" $sdflag \
|
||||||
${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
|
${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
|
||||||
--exit-on-err --filenum="$totfilenum" --destdir="$source_dir" "$fullURL"
|
--exit-on-err --filenum="$totfilenum" --destdir="$source_dir" "$fullURL"
|
||||||
|
Loading…
Reference in New Issue
Block a user