From 9d32a281c9405c7346d1360b180b0e51cf6694e4 Mon Sep 17 00:00:00 2001 From: Noah Zoschke Date: Fri, 28 Oct 2011 10:05:52 -0700 Subject: [PATCH] simplify sed detection --- bin/compile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bin/compile b/bin/compile index 257bd2a..d5cb783 100755 --- a/bin/compile +++ b/bin/compile @@ -11,11 +11,10 @@ NAME=$($BIN_DIR/detect $BUILD_DIR) PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE:-$CACHE_DIR/pip_downloads} VIRTUALENV_DIRS="bin include lib" -sed() { - # prefer GNU sed over BSD sed on OS X - $(which gsed || which sed) "$@" +indent() { + RE="s/^/ /" + [ $(uname) == "Darwin" ] && sed -l "$RE" || sed -u "$RE" } -indent() { sed -u "s/^/ /"; } cd $BUILD_DIR