Avoid error with GNU tail #33

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@okuryu
okuryu commented May 9, 2012

I have following problem to build ySlow for PhantomJS.

$ make phantomjs
building PHANTOMJS...
tail: invalid option -- 'r'
Try `tail --help' for more information.
tail: invalid option -- 'r'
Try `tail --help' for more information.
done
$ uname -a
Linux www6292uf 2.6.32-40-server #87-Ubuntu SMP Tue Mar 6 02:10:02 UTC 2012 x86_64 GNU/Linux
$ tail --version
tail (GNU coreutils) 7.4
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Paul Rubin, David MacKenzie, Ian Lance Taylor,
and Jim Meyering.

GNU tail don't accept -r option. It's should use tac instead of tail to avoid this issue.

@marcelduran
Owner

Thanks @okuryu for your contribution however I ended up with a different approach to keep compatibility with both BSD and Linux: tac where available or tail -r otherwise, big shout out to @dmorilha for coming up with such solution.

@marcelduran marcelduran closed this Jul 3, 2012
@okuryu
okuryu commented Jul 3, 2012

@marcelduran Thanks your fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment