summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2010-07-23 14:07:45 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2010-08-02 07:48:13 +0200
commit8c712d33dd463e7022659b7c9a084cd8ef34fb27 (patch)
tree937d7c138c21c2834d4f2673bc494fabb47e33ca
parentf0431a71adbcb1bdc1c8bb110c4af485f3169c21 (diff)
downloadptxdist-8c712d33dd463e7022659b7c9a084cd8ef34fb27.tar.gz
ptxdist-8c712d33dd463e7022659b7c9a084cd8ef34fb27.tar.xz
[ptxd_make_world_extract] get rid of cmd line options -s and -u
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r--rules/post/ptxd_make_world_extract.make3
-rw-r--r--scripts/lib/ptxd_make_world_extract.sh26
2 files changed, 11 insertions, 18 deletions
diff --git a/rules/post/ptxd_make_world_extract.make b/rules/post/ptxd_make_world_extract.make
index ea878f16d..025b4fe58 100644
--- a/rules/post/ptxd_make_world_extract.make
+++ b/rules/post/ptxd_make_world_extract.make
@@ -19,10 +19,9 @@
# $2: dir to extract into; if $2 is not given we extract to $(BUILDDIR)
#
extract = \
+ $(call world/env, $(1)) \
ptxd_make_extract \
- -s "$($(strip $(1))_SOURCE)" \
-p "$($(strip $(1))_DIR)" \
- -u "$($(strip $(1))_URL)" \
-d "$(strip $(2))"
diff --git a/scripts/lib/ptxd_make_world_extract.sh b/scripts/lib/ptxd_make_world_extract.sh
index 9ba8a605d..97586fc27 100644
--- a/scripts/lib/ptxd_make_world_extract.sh
+++ b/scripts/lib/ptxd_make_world_extract.sh
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Copyright (C) 2008, 2009 by Marc Kleine-Budde <mkl@pengutronix.de>
+# Copyright (C) 2008, 2009, 2010 by Marc Kleine-Budde <mkl@pengutronix.de>
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
@@ -9,26 +9,20 @@
#
# -d DEST
-# -s PACKET_SOURCE
# -p PACKET_DIR
-# -u PACKET_URL
#
ptxd_make_extract() {
+ ptxd_make_world_init || return
+
local opt
. ${PTXDIST_TOPDIR}/scripts/ptxdist_vars.sh || return 1
while getopts "s:p:u:d:" opt; do
case "${opt}" in
- s)
- local packet_source="${OPTARG}"
- ;;
p)
local packet_dir="${OPTARG}"
;;
- u)
- local packet_url="${OPTARG}"
- ;;
d)
local dest="${OPTARG}"
;;
@@ -40,9 +34,9 @@ ptxd_make_extract() {
dest="${dest:-${BUILDDIR}}"
- case "${packet_url}" in
+ case "${pkg_url}" in
file://*)
- local thing="${packet_url//file:\/\//}"
+ local thing="${pkg_url//file:\/\//}"
if [ -n "${packet_source}" ]; then
ptxd_bailout "<PKG>_SOURCE must not be defined when using a file:// URL!"
fi
@@ -54,14 +48,14 @@ ptxd_make_extract() {
echo
echo "Using local archive"
echo
- packet_source="${thing}"
+ pkg_src="${thing}"
else
- ptxd_bailout "the URL '${packet_url}' points to non existing directory or file."
+ ptxd_bailout "the URL '${pkg_url}' points to non existing directory or file."
fi
;;
esac
- if [ -z "${packet_source}" ]; then
+ if [ -z "${pkg_src}" ]; then
echo
echo "Error: empty parameter to 'extract()'"
echo
@@ -72,10 +66,10 @@ ptxd_make_extract() {
mkdir -p "${dest}" || return
fi
- echo "extract: archive=${packet_source}"
+ echo "extract: archive=${pkg_src}"
echo "extract: dest=${dest}"
- ptxd_make_extract_archive "${packet_source}" "${dest}"
+ ptxd_make_extract_archive "${pkg_src}" "${dest}"
}
export -f ptxd_make_extract