#!/bin/sh

if [ $# -eq 0 ]
then
  echo "Usage: genrpcmakefile <arg>"
  exit 1
fi

template="~/src/Makefile.rpcgen.template"
output="Makefile.rpcgen"

cp $template $output
sed -i.bak "s/example/$1/g" $output
rm ${output}.bak

echo "Generated $output"

