mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 14:16:31 +00:00
pkg-infra: move the svn download helper to a script
Maintaining the download helpers in the Makefile has proved to be a bit complex, so move it to a shell script. [Peter: redirect pushd/popd output to /dev/null] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: Samuel Martin <s.martin49@gmail.com> Reviewed-by: Ryan Barnett <ryan.barnett@rockwellcollins.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
95a572282e
commit
daf034f881
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
# Download method commands
|
# Download method commands
|
||||||
WGET := $(call qstrip,$(BR2_WGET)) $(QUIET)
|
WGET := $(call qstrip,$(BR2_WGET)) $(QUIET)
|
||||||
SVN := $(call qstrip,$(BR2_SVN))
|
export SVN := $(call qstrip,$(BR2_SVN))
|
||||||
CVS := $(call qstrip,$(BR2_CVS))
|
CVS := $(call qstrip,$(BR2_CVS))
|
||||||
BZR := $(call qstrip,$(BR2_BZR))
|
BZR := $(call qstrip,$(BR2_BZR))
|
||||||
export GIT := $(call qstrip,$(BR2_GIT))
|
export GIT := $(call qstrip,$(BR2_GIT))
|
||||||
@ -133,11 +133,8 @@ endef
|
|||||||
|
|
||||||
define DOWNLOAD_SVN
|
define DOWNLOAD_SVN
|
||||||
test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
|
test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
|
||||||
(pushd $(DL_DIR) > /dev/null && \
|
$(EXTRA_ENV) support/download/svn $($(PKG)_SITE) $($(PKG)_DL_VERSION) \
|
||||||
$(SVN) export $($(PKG)_SITE)@$($(PKG)_DL_VERSION) $($(PKG)_DL_DIR) && \
|
$($(PKG)_BASE_NAME) $(DL_DIR)/$($(PKG)_SOURCE)
|
||||||
$(TAR) czf $($(PKG)_SOURCE) $($(PKG)_BASE_NAME)/ && \
|
|
||||||
rm -rf $($(PKG)_DL_DIR) && \
|
|
||||||
popd > /dev/null)
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define SOURCE_CHECK_SVN
|
define SOURCE_CHECK_SVN
|
||||||
|
25
support/download/svn
Executable file
25
support/download/svn
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# We want to catch any command failure, and exit immediately
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Download helper for svn
|
||||||
|
# Call it with:
|
||||||
|
# $1: svn repo
|
||||||
|
# $2: svn revision
|
||||||
|
# $3: package's basename (eg. foobar-1.2.3)
|
||||||
|
# $4: output file
|
||||||
|
# And this environment:
|
||||||
|
# SVN : the svn command to call
|
||||||
|
# BR2_DL_DIR: path to Buildroot's download dir
|
||||||
|
|
||||||
|
repo="${1}"
|
||||||
|
rev="${2}"
|
||||||
|
basename="${3}"
|
||||||
|
output="${4}"
|
||||||
|
|
||||||
|
pushd "${BR2_DL_DIR}" >/dev/null
|
||||||
|
${SVN} export "${repo}@${rev}" "${basename}"
|
||||||
|
tar czf "${output}" "${basename}"
|
||||||
|
rm -rf "${basename}"
|
||||||
|
popd >/dev/null
|
Loading…
x
Reference in New Issue
Block a user