sped-create: also support git URL starting by http:// and https://
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
parent
4ec7565752
commit
1ccfb7faff
@ -12,7 +12,10 @@ Wed Apr 18 2012 Davide Madrisan <davide.madrisan(a)gmail.com>
|
||||
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 <davide.madrisan(a)gmail.com>
|
||||
|
@ -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//\:*}'"
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user