Commit 232b2be3 authored by Hunter Loftis's avatar Hunter Loftis

remove sed from output()

parent c5047820
......@@ -2,16 +2,15 @@ info() {
echo " $*"
}
# sed -l basically makes sed replace and buffer through stdin to stdout
# so you get updates while the command runs and dont wait for the end
# e.g. npm install | indent
# sed's buffer can't hold some of the huge build output from JS asset builders
# try awk next? awk '{ print " " $0 }'
output() {
local logfile="$1"
local c='s/^/ /'
case $(uname) in
Darwin) tee -a "$logfile" | sed -l "$c";; # mac/bsd sed: -l buffers on line boundaries
*) tee -a "$logfile" | sed -u "$c";; # unix/gnu sed: -u unbuffered (arbitrary) chunks of data
Darwin) tee -a "$logfile";;
*) tee -a "$logfile";;
esac
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment