scyther/gui/Protocols/IKE/pp.sh
Cas Cremers 34d7cba293 Added IKE base models.
Modelers: Adrian Kyburz and Cas Cremers
2012-11-15 11:48:14 +01:00

22 lines
346 B
Bash
Executable File

#!/bin/sh
FILES="$*"
EXT="pp"
#OUT=.
OUT=pp-results
if [ -n "$FILES" ]; then
for file in $FILES;
do
if [ "$file" = "*.$EXT.*" ]; then
echo "skipping $file"
else
echo "preprocessing $file"
cpp $file | sed -e '/^(\#.*)*$/d' > $OUT/${file%%.*}.$EXT.spdl
fi
done
else
printf "Usage: %s: file...\n" $(basename $0) >&2
exit 1
fi