summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2014-02-28 09:39:45 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2014-02-28 18:49:44 +0100
commit4ebd0c38f378088cac7c114fc7c43a68e9c083fe (patch)
tree5e1473a18bdcc3951069481cc6949dc014928823 /scripts
parent1845352f7cf72096a36a7faf5410f12e775f00d6 (diff)
downloadptxdist-4ebd0c38f378088cac7c114fc7c43a68e9c083fe.tar.gz
ptxdist-4ebd0c38f378088cac7c114fc7c43a68e9c083fe.tar.xz
ptxd_make_world_get: check for file:// URL and <PKG>_SOURCE here
Otherwise we fail after copying the local file. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/ptxd_make_get.sh4
-rw-r--r--scripts/lib/ptxd_make_world_extract.sh3
-rw-r--r--scripts/lib/ptxd_make_world_get.sh8
3 files changed, 10 insertions, 5 deletions
diff --git a/scripts/lib/ptxd_make_get.sh b/scripts/lib/ptxd_make_get.sh
index 26b99d57e..6db53bf31 100644
--- a/scripts/lib/ptxd_make_get.sh
+++ b/scripts/lib/ptxd_make_get.sh
@@ -348,8 +348,8 @@ ptxd_make_get() {
local thing="${url/file:\/\///}"
if [ -f "$thing" ]; then
- echo "local archive, copying"
- cp -av "${thing}" "${PTXDIST_SRCDIR}" && return
+ echo "local archive, skiping get"
+ return
elif [ -d "${thing}" ]; then
echo "local directory instead of tar file, skipping get"
return
diff --git a/scripts/lib/ptxd_make_world_extract.sh b/scripts/lib/ptxd_make_world_extract.sh
index 760ddadb9..92d29f799 100644
--- a/scripts/lib/ptxd_make_world_extract.sh
+++ b/scripts/lib/ptxd_make_world_extract.sh
@@ -43,9 +43,6 @@ ptxd_make_world_extract() {
;;
file://*)
local url="${pkg_url//file:\/\//}"
- if [ -n "${pkg_src}" ]; then
- ptxd_bailout "<PKG>_SOURCE must not be defined when using a file:// URL!"
- fi
if [ -d "${url}" ]; then
echo "local directory instead of tar file, linking build dir"
ln -sf "$(ptxd_abspath "${url}")" "${pkg_dir}"
diff --git a/scripts/lib/ptxd_make_world_get.sh b/scripts/lib/ptxd_make_world_get.sh
index 2fc1ae681..973afa65b 100644
--- a/scripts/lib/ptxd_make_world_get.sh
+++ b/scripts/lib/ptxd_make_world_get.sh
@@ -13,6 +13,14 @@
ptxd_make_world_get() {
ptxd_make_world_init &&
+ case "${pkg_url}" in
+ file://*)
+ if [ -n "${pkg_src}" ]; then
+ ptxd_bailout "<PKG>_SOURCE must not be defined when using a file:// URL!"
+ fi
+ ;;
+ esac
+
if [ -n "${pkg_src}" -a \! -e "${pkg_src}" ]; then
ptxd_make_get "${pkg_src}" "${pkg_url}"
fi