summaryrefslogtreecommitdiff
path: root/src/bin/eet
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2014-10-23 15:28:30 +0100
committerDaniel Hirt <daniel.hirt@samsung.com>2014-11-12 11:05:05 +0200
commit0042d3b2eaac7f2c25e6e5e06b1a931ca1fea844 (patch)
treeed5094d5a3919ffac8f9293b80687492d1243183 /src/bin/eet
parent5057cf31b34536d9700a9ab288f3dc161b661333 (diff)
vieet: list the sections of an eet file if a section isn't passed.
Thanks to Sachiel for suggesting this feature.
Diffstat (limited to 'src/bin/eet')
-rwxr-xr-xsrc/bin/eet/vieet12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/bin/eet/vieet b/src/bin/eet/vieet
index 64f7d88..8bfdb4e 100755
--- a/src/bin/eet/vieet
+++ b/src/bin/eet/vieet
@@ -14,9 +14,17 @@ die() {
14} 14}
15 15
16usage() { 16usage() {
17 die "Usage: vieet <eet file> <section>" 17 die "Usage: vieet <eet file> [section]"
18} 18}
19 19
20EETFILE="$1"
21SECTION="$2"
22
23if [ $# -eq 1 ]; then
24 eet -l "$EETFILE"
25 exit $?
26fi
27
20if [ $# -ne 2 ]; then 28if [ $# -ne 2 ]; then
21 usage 29 usage
22fi 30fi
@@ -25,8 +33,6 @@ if [ -z "$EDITOR" ]; then
25 die "EDITOR env var must be set." 33 die "EDITOR env var must be set."
26fi 34fi
27 35
28EETFILE="$1"
29SECTION="$2"
30TFILE=$(mktemp) 36TFILE=$(mktemp)
31 37
32if [ $? -ne 0 ]; then 38if [ $? -ne 0 ]; then