Commit 58004ea9 authored by Hunter Loftis's avatar Hunter Loftis

Merge pull request #276 from heroku/simple-output-format

replace tee/sed/awk with a simple echo loop
parents 4058847f 9444a6f7
......@@ -2,19 +2,15 @@ info() {
echo " $*"
}
# format output on both OSX and Ubuntu, cedar-10 and cedar-14, while also splitting to a log file
# format output and send a copy to the log
output() {
local logfile="$1"
local c='s/^/ /'
if [ "${STACK:-cedar-14}" = "cedar" ]; then
tee -a "$logfile" | awk -W interactive '{ print " " $0 }'
else
case $(uname) in
Darwin) sed -l "$c" | tee -i -a "$logfile" 2> /dev/null;;
*) stdbuf -oL -eL sed -u "$c" | tee -i -a "$logfile" 2> /dev/null;;
esac
fi
while read LINE;
do
echo " $LINE"
echo "$LINE" >> "$logfile"
done
}
header() {
......
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