summary refs log tree commit diff
path: root/debian/bsdyacc
blob: ce71f4c0ddf325552241cca8ddff9c5d6372a23d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
b4eae47292305e4e55ab55102cae318&follow=1'>Source .editrc before applying -v or -eJune McEnroe 2019-12-20Disable signing commitsJune McEnroe 2019-12-19Ignore about-filterJune McEnroe 2019-12-19Fix matching make tags with no sourcesJune McEnroe 2019-12-19Avoid matching := assignments as tagsJune McEnroe 2019-12-18Hide line numbers when rendering mdocJune McEnroe 2019-12-18Customize cgit CSSJune McEnroe 2019-12-18Use :target rather than :focus pseudo-classJune McEnroe 2019-12-18Copy cgit auxiliary binaries properlyJune McEnroe 2019-12-18Add git.causal.agency cgit configJune McEnroe 2019-12-18Bail from hi if input is binaryJune McEnroe 2019-12-16Post "cgit setup"June McEnroe