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.
|
Add a "## GITSOURCE" comment containing the URL of the git repository.
|
||||||
This information will instruct pck-update on how to update the package.
|
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
|
Changes in version 1.9.4
|
||||||
Tue Apr 17 2012 Davide Madrisan <davide.madrisan(a)gmail.com>
|
Tue Apr 17 2012 Davide Madrisan <davide.madrisan(a)gmail.com>
|
||||||
|
@ -474,18 +474,7 @@ function specfile.create() {
|
|||||||
local pck_name pck_version
|
local pck_name pck_version
|
||||||
|
|
||||||
case "$2" in
|
case "$2" in
|
||||||
http://*|https://*|ftp://*)
|
git://*|http://*.git|https://*.git)
|
||||||
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://*)
|
|
||||||
tmpgitdir=$(mktemp -q -d -t tmpgit.XXXXXXXX)
|
tmpgitdir=$(mktemp -q -d -t tmpgit.XXXXXXXX)
|
||||||
[ $? -eq 0 ] ||
|
[ $? -eq 0 ] ||
|
||||||
notify.error $"can't create temporary files"
|
notify.error $"can't create temporary files"
|
||||||
@ -528,6 +517,17 @@ an error occurred while creating"": ${pck_tarball}.tar.bz2"; }
|
|||||||
popd &>/dev/null
|
popd &>/dev/null
|
||||||
rm -fr $tmpgitdir
|
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//\:*}'"
|
notify.error $"unsupported protocol"": \`${2//\:*}'"
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user