#!/bin/sh
ref=$(git symbolic-ref HEAD 2> /dev/null)
if [[ -n $ref ]]; then
if [[ $ref =~ "master" ]]; then
rm public/.htaccess
else
echo "RailsEnv ${ref#refs/heads/}" > public/.htaccess
fi
touch tmp/restart.txt
fi