#!/bin/sh

TARGETS="
*.c
*.cpp
*.h
*.hpp
commands/*.c
commands/*.cpp
commands/*.h
commands/*.hpp
events/*.c
events/*.cpp
events/*.h
events/*.hpp
include/*.h
include/*.hpp
include/atomic/*.h
include/atomic/*.hpp
"

if test $# != 2; then
	echo "error: bogus number of arguments"
	exit 1
fi

if test -z "$1"; then
	echo "error: first argument is of zero length"
	exit 1
fi

for target in $TARGETS; do
	sed -i "s/$1/$2/g" "$target"
done
