13 lines
195 B
Bash

#!/bin/sh
if [ -z "$1" ]; then
echo "Usage: $0 [patch name]"
exit 1
fi
for ext in .cpp .h _ops.h _constants.h _structs.h
do
cp template$ext $1$ext
perl -pi -e "s/TEMPLATE/$1/g" $1$ext
done