mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-31 15:07:43 +00:00
pkg-infra: move the scp 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. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
45261f1fb7
commit
54adff55d5
@ -14,7 +14,7 @@ export CVS := $(call qstrip,$(BR2_CVS))
|
|||||||
export BZR := $(call qstrip,$(BR2_BZR))
|
export BZR := $(call qstrip,$(BR2_BZR))
|
||||||
export GIT := $(call qstrip,$(BR2_GIT))
|
export GIT := $(call qstrip,$(BR2_GIT))
|
||||||
export HG := $(call qstrip,$(BR2_HG)) $(QUIET)
|
export HG := $(call qstrip,$(BR2_HG)) $(QUIET)
|
||||||
SCP := $(call qstrip,$(BR2_SCP)) $(QUIET)
|
export SCP := $(call qstrip,$(BR2_SCP)) $(QUIET)
|
||||||
SSH := $(call qstrip,$(BR2_SSH)) $(QUIET)
|
SSH := $(call qstrip,$(BR2_SSH)) $(QUIET)
|
||||||
LOCALFILES := $(call qstrip,$(BR2_LOCALFILES))
|
LOCALFILES := $(call qstrip,$(BR2_LOCALFILES))
|
||||||
|
|
||||||
@ -147,7 +147,8 @@ endef
|
|||||||
# to prepend the path with a slash: scp://[user@]host:/absolutepath
|
# to prepend the path with a slash: scp://[user@]host:/absolutepath
|
||||||
define DOWNLOAD_SCP
|
define DOWNLOAD_SCP
|
||||||
test -e $(DL_DIR)/$(2) || \
|
test -e $(DL_DIR)/$(2) || \
|
||||||
$(SCP) '$(call stripurischeme,$(call qstrip,$(1)))' $(DL_DIR)/$(2)
|
$(EXTRA_ENV) support/download/scp '$(call stripurischeme,$(call qstrip,$(1)))' \
|
||||||
|
$(DL_DIR)/$(2)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define SOURCE_CHECK_SCP
|
define SOURCE_CHECK_SCP
|
||||||
|
16
support/download/scp
Executable file
16
support/download/scp
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# We want to catch any command failure, and exit immediately
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Download helper for scp
|
||||||
|
# Call it with:
|
||||||
|
# $1: URL
|
||||||
|
# $2: output file
|
||||||
|
# And this environment:
|
||||||
|
# SCP : the scp command to call
|
||||||
|
|
||||||
|
url="${1}"
|
||||||
|
output="${2}"
|
||||||
|
|
||||||
|
${SCP} "${url}" "${output}"
|
Loading…
x
Reference in New Issue
Block a user