summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2014-02-23 18:09:36 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2014-02-25 09:02:57 +0100
commit33bc759e7df12817091fb021e4fccf4aa38fe492 (patch)
tree798abf4ef8d8b80fb71517be4ff063c13a862048 /bin
parent9f8e963a2c63a2ec840410cadc52701d1085ff7b (diff)
downloadptxdist-33bc759e7df12817091fb021e4fccf4aa38fe492.tar.gz
ptxdist-33bc759e7df12817091fb021e4fccf4aa38fe492.tar.xz
ptxdist: allow multiple arguments for 'ptxdist print'
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ptxdist28
1 files changed, 18 insertions, 10 deletions
diff --git a/bin/ptxdist b/bin/ptxdist
index 9e58224c0..1fa5ff0e3 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -1842,18 +1842,26 @@ EOF
exit
;;
print)
- check_config &&
- if [ -z "${1}" ]; then
+ if [ ${#} -eq 0 ]; then
exit 1
- elif [ -n "${!1}" ]; then
- echo "${!1}"
- else
- check_deps
- ptxd_make_log "print-${1}" 2>/dev/null || {
- echo "${1} undefined" >&2
- exit 1
- }
fi
+ while [ ${#} -gt 0 ]; do
+ if [ -n "${!1}" ]; then
+ echo "${!1}"
+ else
+ local check
+ if [ -z "${check}" ]; then
+ check_config &&
+ check_deps || exit 1
+ check=1
+ fi
+ ptxd_make_log "print-${1}" 2>/dev/null || {
+ echo "${1} undefined" >&2
+ exit 1
+ }
+ fi
+ shift
+ done
exit
;;
projects)