34d7cba293
Modelers: Adrian Kyburz and Cas Cremers
22 lines
346 B
Bash
Executable File
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
|