diff --git a/ChangeLog b/ChangeLog index dc9945e..ace0f18 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,7 +12,10 @@ Wed Apr 18 2012 Davide Madrisan Add a "## GITSOURCE" comment containing the URL of the git repository. This information will instruct pck-update on how to update the package. --------------------------------------------------------------------------------- + * spec-create - Davide Madrisan: + Also support git URL starting by http:// and https://. + +------------------------------------------------------------------------------- Changes in version 1.9.4 Tue Apr 17 2012 Davide Madrisan diff --git a/plugins/spec-create.in b/plugins/spec-create.in index 682aadf..d19208d 100644 --- a/plugins/spec-create.in +++ b/plugins/spec-create.in @@ -474,18 +474,7 @@ function specfile.create() { local pck_name pck_version case "$2" in - http://*|https://*|ftp://*) - pck_tarball="${2##*/}" - spec_source="$2" - - curl.download \ ---options "$curl_options" \ -${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \ ---exit-on-err --destdir="$source_dir" "$spec_source" - - pck_tarball=$source_dir/$pck_tarball - ;; - git://*) + git://*|http://*.git|https://*.git) tmpgitdir=$(mktemp -q -d -t tmpgit.XXXXXXXX) [ $? -eq 0 ] || notify.error $"can't create temporary files" @@ -528,6 +517,17 @@ an error occurred while creating"": ${pck_tarball}.tar.bz2"; } popd &>/dev/null rm -fr $tmpgitdir ;; + http://*|https://*|ftp://*) + pck_tarball="${2##*/}" + spec_source="$2" + + curl.download \ +--options "$curl_options" \ +${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \ +--exit-on-err --destdir="$source_dir" "$spec_source" + + pck_tarball=$source_dir/$pck_tarball + ;; *://*) notify.error $"unsupported protocol"": \`${2//\:*}'" ;;