diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2010-03-14 18:22:49 +0100 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2010-04-01 10:23:13 +0200 |
commit | d31c864cf06264943d0dfc67a286d22e3ec70c1f (patch) | |
tree | 2b086e89466783b6526f3ac5f8a0a2223d6c9f2f /scripts | |
parent | 37c894e492f9d43ee3241cf403309cc0fcd4c4ff (diff) | |
download | ptxdist-d31c864cf06264943d0dfc67a286d22e3ec70c1f.tar.gz ptxdist-d31c864cf06264943d0dfc67a286d22e3ec70c1f.tar.xz |
[libptxdist] ptxd_get_dirs
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/libptxdist.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/libptxdist.sh b/scripts/libptxdist.sh index 1f9a13699..5850f74a3 100644 --- a/scripts/libptxdist.sh +++ b/scripts/libptxdist.sh @@ -435,6 +435,19 @@ ptxd_dumpstack() { } +# +# +# return: +# 0 if dirs are found +# 1 if no dirs are found +# +ptxd_get_dirs() { + ptxd_reply=( $(eval command ls -f -d "${@}" 2>/dev/null) ) + + [ ${#ptxd_reply[@]} -ne 0 ] +} +export -f ptxd_get_dirs + # # convert a relative or absolute path into an absolute path |