cic-contracts/texify.sh

13 lines
310 B
Bash
Raw Normal View History

#!/bin/bash
for f in $(ls solidity/*.sol); do
fn=$(basename $f)
fb=${fn%.*}
fn="build/contract_${fb}.texi"
#echo "@verbatim" > $fn
echo -e "@example\n@verbatim" > $fn
awk 'f;/interface [a-zA-Z0-9]* /{print;f=1}' $f >> $fn
#echo "@end verbatim" >> $fn
echo -e "@end verbatim\n@end example" >> $fn
done