Eet vieet: Fixed to work on non-bash compat shells.
authorTom Hacohen <tom@stosb.com>
Sat, 8 Mar 2014 10:55:37 +0000 (10:55 +0000)
committerTom Hacohen <tom@stosb.com>
Sat, 8 Mar 2014 10:55:37 +0000 (10:55 +0000)
Thanks to Davide Andreoli for reporting and suggesting fixes.

src/bin/eet/vieet

index 8c38a10..64f7d88 100755 (executable)
@@ -1,19 +1,19 @@
 #!/bin/sh
 
-function cleanup() {
+cleanup() {
     if [ ! -z "$TFILE" ]; then
         rm "$TFILE"
     fi
 }
 
-function die() {
+die() {
     echo "$@"
     echo "Aborting"
     cleanup
     exit 1
 }
 
-function usage() {
+usage() {
     die "Usage: vieet <eet file> <section>"
 }
 
@@ -21,7 +21,7 @@ if [ $# -ne 2 ]; then
     usage
 fi
 
-if [[ -z "$EDITOR" ]]; then
+if [ -z "$EDITOR" ]; then
     die "EDITOR env var must be set."
 fi