fextest.sh 420 Bytes
Newer Older
1
2
3
4
5
6
7
8
#!/bin/bash
echo $0 $*
FEX2BIN=../fex2bin
BIN2FEX=../bin2fex
FEX=$1
BIN=${FEX/%.fex/.bin}
REVERSE=${FEX/%.fex/.new}
${FEX2BIN} ${FEX} ${BIN}
9
10
11
12
13
14
15
16
17
18
19
${BIN2FEX} ${BIN} ${REVERSE}
# preprocess .fex, compare it to the bin2fex output
if ./unify-fex ${FEX} | diff -uwB - ${REVERSE}; then
	# if successful, clean up the output files
	rm -f ${BIN} ${REVERSE}
else
	echo '***'
	echo "*** ERROR processing ${FEX}"
	echo '***'
	exit 1
fi