diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2005-09-26 18:32:28 +1000 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2005-09-26 18:32:28 +1000 |
commit | 05c1076ba2d1a68fe7f3a5ae618f786b8898d327 (patch) | |
tree | 8e3b5ecace201bfd29027ccb59110cc1d600ad37 /debian/bsdyacc | |
download | dash-05c1076ba2d1a68fe7f3a5ae618f786b8898d327.tar.gz dash-05c1076ba2d1a68fe7f3a5ae618f786b8898d327.zip |
Initial import.
Diffstat (limited to '')
-rw-r--r-- | debian/bsdyacc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/debian/bsdyacc b/debian/bsdyacc new file mode 100644 index 0000000..ce71f4c --- /dev/null +++ b/debian/bsdyacc @@ -0,0 +1,20 @@ +#!/bin/sh -e + +if echo "$@" | grep -q -- -o; then + OUTPUT=$(echo "$@" | + sed 's/.*-o[[:blank:]]\+\([^[:blank:]]\+\)\.c.*/\1/') + OPTIONS=$(echo "$@" | + sed 's/\(.*\)-o[[:blank:]]\+[^[:blank:]]\+\(.*\)/\1\2/') + NEW=1 +else + OUTPUT=$(echo "$@" | + sed -e 's/.*[[:blank:]]\+\([^[:blank:]]\+\)\.y.*/\1/') + OPTIONS="$@" + NEW=0 +fi + +byacc $OPTIONS +if [ $NEW = 1 ]; then + mv y.tab.c $OUTPUT.c +fi +mv y.tab.h $OUTPUT.h |