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
232b2be3
Commit
232b2be3
authored
Oct 06, 2015
by
Hunter Loftis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove sed from output()
parent
c5047820
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
output.sh
lib/output.sh
+4
-5
No files found.
lib/output.sh
View file @
232b2be3
...
...
@@ -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
}
...
...
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