Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
heroku-buildpack-nodejs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
heroku-buildpack-nodejs
Commits
58004ea9
Commit
58004ea9
authored
Oct 09, 2015
by
Hunter Loftis
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #276 from heroku/simple-output-format
replace tee/sed/awk with a simple echo loop
parents
4058847f
9444a6f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
output.sh
lib/output.sh
+6
-10
No files found.
lib/output.sh
View file @
58004ea9
...
...
@@ -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
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment