summaryrefslogtreecommitdiff
path: root/src/bin/eet
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-08-18 16:10:36 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-08-18 16:38:19 +0900
commitfbf294d9ee6fda60d3f5873bd18c97851b74d533 (patch)
tree6054bc32df1b224c6b0d1bcd8c3afd0255921416 /src/bin/eet
parentfb57bc0106d7719fd36de2a597e2bbcf582f5e82 (diff)
vieet: Add read-only mode
Really ugly scripting right there.
Diffstat (limited to 'src/bin/eet')
-rwxr-xr-xsrc/bin/eet/vieet16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/bin/eet/vieet b/src/bin/eet/vieet
index 8bfdb4e869..48a6827943 100755
--- a/src/bin/eet/vieet
+++ b/src/bin/eet/vieet
@@ -14,18 +14,29 @@ die() {
14} 14}
15 15
16usage() { 16usage() {
17 die "Usage: vieet <eet file> [section]" 17 die "Usage: vieet [-r] <eet file> [section]"
18} 18}
19 19
20READONLY=0
20EETFILE="$1" 21EETFILE="$1"
21SECTION="$2" 22SECTION="$2"
23ARGCNT=2
22 24
23if [ $# -eq 1 ]; then 25if [ $# -eq 1 ]; then
26 if [ "$1" = "-h" ]; then usage; fi
27 echo "Available sections:"
24 eet -l "$EETFILE" 28 eet -l "$EETFILE"
25 exit $? 29 exit $?
26fi 30fi
27 31
28if [ $# -ne 2 ]; then 32if [ "$1" = "-r" ]; then
33 READONLY=1
34 EETFILE=$2
35 SECTION=$3
36 ARGCNT=3
37fi
38
39if [ $# -ne $ARGCNT ]; then
29 usage 40 usage
30fi 41fi
31 42
@@ -52,6 +63,7 @@ while [ $DONE -ne 1 ]
52do 63do
53 $EDITOR $TFILE 64 $EDITOR $TFILE
54 65
66 if [ $READONLY -eq 1 ]; then break; fi
55 eet -e "$EETFILE" "$SECTION" "$TFILE" 1 67 eet -e "$EETFILE" "$SECTION" "$TFILE" 1
56 if [ $? -ne 0 ]; then 68 if [ $? -ne 0 ]; then
57 echo "Failed compiling eet file." 69 echo "Failed compiling eet file."