Eet vieet: Fixed to work on non-bash compat shells.

Thanks to Davide Andreoli for reporting and suggesting fixes.
This commit is contained in:
Tom Hacohen 2014-03-08 10:55:37 +00:00
parent a660bbe966
commit 561ea66dec
1 changed files with 4 additions and 4 deletions

View File

@ -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