diff options
author | Guido Guenther <agx@sigxcpu.org> | 2006-11-18 23:48:07 +0100 |
---|---|---|
committer | Guido Guenther <agx@bogon.sigxcpu.org> | 2006-11-18 23:48:07 +0100 |
commit | d1e063beb43e595680c65e3804d1f8ddff53373b (patch) | |
tree | f7256dfe1b807920270ec5113df6f6e4abf1ed0f /e2fslib/et/compile_et |
Imported Debian version 0.3.8.80.3.8.8
Diffstat (limited to 'e2fslib/et/compile_et')
-rwxr-xr-x | e2fslib/et/compile_et | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/e2fslib/et/compile_et b/e2fslib/et/compile_et new file mode 100755 index 0000000..ca19559 --- /dev/null +++ b/e2fslib/et/compile_et @@ -0,0 +1,31 @@ +#!/bin/sh +# +# +AWK=/usr/bin/awk +DIR="${DIR-/usr/share/et}" +ET_DIR="et" + +if test "x$1" = x ; then + echo "Usage: compile_et file" + exit 1 +fi + +if test ! -f "$DIR/et_h.awk" -o ! -f "$DIR/et_c.awk" ; then + DIR="$ET_DIR" +# echo "Falling back to $DIR..." + if test ! -f "$DIR/et_h.awk" -o ! -f "$DIR/et_c.awk" ; then + echo "compile_et: Couldn't find compile_et's template files." + exit 1 + fi +fi + +ROOT=`echo $1 | sed -e s/.et$//` +BASE=`basename $ROOT` + +if test ! -f "$ROOT.et" ; then + echo "compile_et: $ROOT.et: File not found" + exit 1; +fi + +$AWK -f "${DIR}/et_h.awk" "outfile=${BASE}.h" "$ROOT.et" +$AWK -f "${DIR}/et_c.awk" "outfile=${BASE}.c" "$ROOT.et" |