2014-03-07 16:11 GMT+01:00 Tom Hacohen <t...@stosb.com>: > tasn pushed a commit to branch master. > > > http://git.enlightenment.org/core/efl.git/commit/?id=e63a5cc903e356612c5d55ce4e39f93b0e0a521a > > commit e63a5cc903e356612c5d55ce4e39f93b0e0a521a > Author: Tom Hacohen <t...@stosb.com> > Date: Fri Mar 7 15:11:30 2014 +0000 > > Eet: Added vieet a tool to edit eet files. > > This tool lets you just open an eet file for editing directly, > by wrapping around 'eet' and the preferred editor defined in the env > var > 'EDITOR'. > > @feature >
really cool and usefull, but do not run on my machine, and probably on every debian based system out there. I think the problem is that you are using some "bashism" in the script but the shebang is #!/bin/sh On debian /bin/sh link to dash, that is posix (not bash) compliant. I can solve the problem changing the shebang to /bin/bash, or we can try to use only posix compliant stuff. First error I got is on function definition, you are using: function func_name() {} that seems to be a bashism, it should be just: func_name() {} but then other issue comes up, I did not investigate further. > --- > src/Makefile_Eet.am | 1 + > src/bin/eet/vieet | 59 > +++++++++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 60 insertions(+) > > diff --git a/src/Makefile_Eet.am b/src/Makefile_Eet.am > index 05e9acb..b8540f5 100644 > --- a/src/Makefile_Eet.am > +++ b/src/Makefile_Eet.am > @@ -37,6 +37,7 @@ EXTRA_DIST += static_libs/lz4/README > ### Binary > > bin_PROGRAMS += bin/eet/eet > +bin_SCRIPTS += bin/eet/vieet > > bin_eet_eet_SOURCES = bin/eet/eet_main.c > > diff --git a/src/bin/eet/vieet b/src/bin/eet/vieet > new file mode 100755 > index 0000000..8c38a10 > --- /dev/null > +++ b/src/bin/eet/vieet > @@ -0,0 +1,59 @@ > +#!/bin/sh > + > +function cleanup() { > + if [ ! -z "$TFILE" ]; then > + rm "$TFILE" > + fi > +} > + > +function die() { > + echo "$@" > + echo "Aborting" > + cleanup > + exit 1 > +} > + > +function usage() { > + die "Usage: vieet <eet file> <section>" > +} > + > +if [ $# -ne 2 ]; then > + usage > +fi > + > +if [[ -z "$EDITOR" ]]; then > + die "EDITOR env var must be set." > +fi > + > +EETFILE="$1" > +SECTION="$2" > +TFILE=$(mktemp) > + > +if [ $? -ne 0 ]; then > + die "Failed creating tempfile." > +fi > + > +# Decode the file > +eet -d "$EETFILE" "$SECTION" "$TFILE" > + > +if [ $? -ne 0 ]; then > + die "Failed decoding eet file." > +fi > + > +DONE=0 > + > +while [ $DONE -ne 1 ] > +do > + $EDITOR $TFILE > + > + eet -e "$EETFILE" "$SECTION" "$TFILE" 1 > + if [ $? -ne 0 ]; then > + echo "Failed compiling eet file." > + echo "Press 'Return' to reopen the editor, or ^C to abort." > + read > + else > + DONE=1 > + fi > +done > + > +cleanup > > -- > > > ------------------------------------------------------------------------------ Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. With Perforce, you get hassle-free workflows. Merge that actually works. Faster operations. Version large binaries. Built-in WAN optimization and the freedom to use Git, Perforce or both. Make the move to Perforce. http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel