summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorWolfram Sang <w.sang@pengutronix.de>2008-02-20 18:57:15 +0000
committerWolfram Sang <w.sang@pengutronix.de>2008-02-20 18:57:15 +0000
commit5f7a35d3a90b463761a6da0633b067b983e696c5 (patch)
tree791bef2b3924735e9c3ae514e307c9223f74af74 /bin
parentc5000e365899556b53672ac3c99008e1d7994d68 (diff)
downloadptxdist-5f7a35d3a90b463761a6da0633b067b983e696c5.tar.gz
ptxdist-5f7a35d3a90b463761a6da0633b067b983e696c5.tar.xz
* bin/ptxdist
- for actions that accept a packet as a parameter, add check if packet is actually selected - fix two typos git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@7785 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ptxdist23
1 files changed, 21 insertions, 2 deletions
diff --git a/bin/ptxdist b/bin/ptxdist
index 9b2fa5395..ecae1cd61 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -424,6 +424,17 @@ check_native() {
fi
}
+check_if_selected() {
+ CONFIGVAR=PTXCONF_$(echo $1 | tr 'a-z' 'A-Z')
+ PTXCONFIG_CONFIGVAR=$(. "${PTXCONFIG}" && eval echo \$$CONFIGVAR)
+ if [ -z ${PTXCONFIG_CONFIGVAR} ]; then
+ echo
+ echo "${PROMPT}error: $1 is not selected in ${PTXCONFIG}"
+ echo
+ exit 1
+ fi
+}
+
#
# usage()
#
@@ -804,7 +815,7 @@ setup() {
tmpdir=`mktemp -d /tmp/ptxdist.XXXXXX`
pushd $tmpdir > /dev/null
- # prepare everything to make kconfig see it's original environment
+ # prepare everything to make kconfig see its original environment
cp "${PTXDIST_TOPDIR}/config/setup/ptxdistrc.default" .config
if [ -f "$HOME/.ptxdistrc.${FULLVERSION}" ]; then
echo "using \$HOME/.ptxdistrc.${FULLVERSION}"
@@ -922,6 +933,7 @@ while [ "$#" != "0" ]; do
exit 1
fi
check_ptxconfig
+ check_if_selected $1
check_native
check_compiler
check_dirs
@@ -932,6 +944,7 @@ while [ "$#" != "0" ]; do
;;
clean) shift
check_ptxconfig
+ check_if_selected $1
check_deps
clean $1
exit 0
@@ -957,10 +970,12 @@ while [ "$#" != "0" ]; do
;;
drop) shift
check_ptxconfig
+ check_if_selected $1
drop $1 $2
;;
extract) shift
check_ptxconfig
+ check_if_selected $1
check_native
check_deps
ptxd_make $1_extract 2>&1 | tee -a logfile
@@ -969,6 +984,7 @@ while [ "$#" != "0" ]; do
;;
get) shift
check_ptxconfig
+ check_if_selected $1
check_native
check_deps
if [ $# -eq 0 ]; then
@@ -1004,6 +1020,7 @@ while [ "$#" != "0" ]; do
;;
install) shift
check_ptxconfig
+ check_if_selected $1
check_native
check_compiler
check_dirs
@@ -1147,6 +1164,7 @@ while [ "$#" != "0" ]; do
;;
prepare) shift
check_ptxconfig
+ check_if_selected $1
check_native
check_compiler
check_dirs
@@ -1206,6 +1224,7 @@ while [ "$#" != "0" ]; do
setup) shift; setup;;
targetinstall) shift
check_ptxconfig
+ check_if_selected $1
check_native
check_compiler
check_dirs
@@ -1234,7 +1253,7 @@ while [ "$#" != "0" ]; do
echo
else
echo
- echo "${PROMPT}error: Test '$1' not found in PTXDIST_TOPDIR and PTXDIST_WORKSPACE"
+ echo "${PROMPT}error: test '$1' not found in PTXDIST_TOPDIR and PTXDIST_WORKSPACE"
echo
fi
fi