#!/bin/bash

for f in `find . -name "*.rn2.pbtxt"`
do
  echo "v1 {" >"$f.new"
  echo "region { " >>"$f.new"
  cat "$f" >>"$f.new"
  echo "}" >>"$f.new"
  echo "}" >>"$f.new"
  mv "$f.new" "$f"
  f2=${f//rn2.pbtxt/zrn.pbtxt}
  git add "$f"
  git mv "$f" "$f2"
done

# sed -i s/.rn2.pbtxt/.zrn.pbtxt/ `find . -name "*" -type f`
