Skip to content

Commit

Permalink
fixing replace for mountain lion
Browse files Browse the repository at this point in the history
  • Loading branch information
imhotep committed Jul 28, 2012
1 parent 563fa46 commit 9ef487a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/create
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ function replace {
local pattern=$1
local filename=$2
# Mac OS X requires -i argument
if [ $OSTYPE = 'darwin11' ]
if [[ "$OSTYPE" =~ "darwin" ]]
then
sed -i '' -e $pattern "$filename"
elif [ $OSTYPE = 'linux-gnu' ]
/usr/bin/sed -i '' -e $pattern "$filename"
elif [[ "$OSTYPE" =~ "linux" ]]
then
sed -i -e $pattern "$filename"
/bin/sed -i -e $pattern "$filename"
fi
}

Expand Down

0 comments on commit 9ef487a

Please sign in to comment.