summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-07-13 15:07:38 +0800
committerAaron LI <aaronly.me@outlook.com>2016-07-13 15:07:38 +0800
commit9260cbdb7fadb1abab95f064a8e1d1323ebbd477 (patch)
treed3559686fbcd58e106ad2706273cb2c4065fbedb
parentd5896c15cbdc06a641ea21a6d59cb7750830a2de (diff)
downloadcexcess-9260cbdb7fadb1abab95f064a8e1d1323ebbd477.tar.bz2
analyze_path.sh: update arguments and output
-rwxr-xr-xanalyze_path.sh16
1 files changed, 7 insertions, 9 deletions
diff --git a/analyze_path.sh b/analyze_path.sh
index e39ffc0..2a9d510 100755
--- a/analyze_path.sh
+++ b/analyze_path.sh
@@ -47,17 +47,15 @@ analyze_path() {
case "$1" in
-[hH]*)
echo "Usage:"
- echo " `basename $0` <path1> ..."
+ echo " `basename $0` [ path ]"
exit 1
;;
esac
-echo "NAME,OI,PATH"
-while [ ! -z "$1" ]; do
- path="$1"
- shift
- name=`analyze_path "${path}" | grep '^name:' | awk '{ print $2 }'`
- oi=`analyze_path "${path}" | grep '^oi:' | awk '{ print $2 }'`
- echo "${name},${oi},${path}"
-done
+if [ -z "$1" ]; then
+ DIR="${PWD}"
+else
+ DIR="$1"
+fi
+analyze_path "${DIR}"