summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfram Sang <w.sang@pengutronix.de>2008-03-03 11:39:00 +0000
committerWolfram Sang <w.sang@pengutronix.de>2008-03-03 11:39:00 +0000
commit5d40d185b573c7efde81259f9284ed83e5606210 (patch)
treebd3269687c7b9297f4f821ce3cb3c2864ea57c82
parenteef80573f4cf419dac32713dd55107aead94b4bf (diff)
downloadptxdist-5d40d185b573c7efde81259f9284ed83e5606210.tar.gz
ptxdist-5d40d185b573c7efde81259f9284ed83e5606210.tar.xz
* bin/ptxdist
- add check if a target is specified to check_if_selected - move check_if_selected in get to sane position git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@7812 33e552b5-05e3-0310-8538-816dae2090ed
-rwxr-xr-xbin/ptxdist12
1 files changed, 7 insertions, 5 deletions
diff --git a/bin/ptxdist b/bin/ptxdist
index 4d2320a7f..3fdd38f83 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -425,6 +425,12 @@ check_native() {
}
check_if_selected() {
+ if [ -z $1 ]; then
+ echo
+ echo "${PROMPT}error: please specify a target"
+ echo
+ exit 1
+ fi
local CONFIGVAR=PTXCONF_$(echo $1 | tr 'a-z-' 'A-Z_')
local PTXCONFIG_CONFIGVAR=$(ptxd_get_ptxconf $CONFIGVAR)
if [ -z ${PTXCONFIG_CONFIGVAR} ]; then
@@ -929,10 +935,6 @@ while [ "$#" != "0" ]; do
boardsetup
;;
compile) shift
- if [ $# -eq 0 ]; then
- echo "${PROMPT}error: add target you want to compile"
- exit 1
- fi
check_ptxconfig
check_if_selected $1
check_native
@@ -983,7 +985,6 @@ while [ "$#" != "0" ]; do
;;
get) shift
check_ptxconfig
- check_if_selected $1
check_native
check_deps
if [ $# -eq 0 ]; then
@@ -991,6 +992,7 @@ while [ "$#" != "0" ]; do
check_pipe_status
exit 0
else
+ check_if_selected $1
ptxd_make $1_get 2>&1 | tee -a logfile
check_pipe_status
exit 0