Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 27th, 2012  |  syntax: None  |  size: 0.23 KB  |  views: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/bin/sh
  2.  
  3. ref=$(git symbolic-ref HEAD 2> /dev/null)
  4. if [[ -n $ref ]]; then
  5.  
  6.   if [[ $ref =~ "master" ]]; then
  7.     rm public/.htaccess
  8.   else
  9.     echo "RailsEnv ${ref#refs/heads/}" > public/.htaccess
  10.   fi
  11.   touch tmp/restart.txt
  12. fi