On 04/18/11 08:13 AM, Matthias Kilian wrote:
On Sun, Apr 17, 2011 at 11:44:33PM +0200, Karel Gardas wrote:
This patch fixes issue with version date processing on Solaris while using
Solaris' provided sed. I don't know sed enough to remove GNUism in version
date processing so I replaced sed usage in this task by few cut calls.
Out of curiosity: what's the result of the original command on Solaris?
git log -n 1 --date=short --pretty=format:%ci | sed
"s/^.*\([0-9][0-9][0-9][0-9]\)-\([0-9][0-9]\)-\([0-9][0-9]\).*$/\1\2\3/"
It's empty output if I use /usr/bin/sed. And is following output if I
use /usr/xpg4/bin/sed:
$ git log -n 1 --date=short --pretty=format:%ci | /usr/xpg4/bin/sed
"s/^.*\([0-9][0-9][0-9][0-9]\)-\([0-9][0-9]\)-\([0-9][0-9]\).*$/\1\2\3/"
sed: Missing newline at end of file standard input.
20110417
$
so as a workaround I may also use /usr/xpg4/bin/sed...
Apart from this, a much simpler version (using cut, inspired by
your diff, but also tr) may be:
git log -n 1 --date=short --pretty=format:%ci | cut -d ' ' -f 1 | tr -d
-
Does this work on Solaris?
Great! This works too and is way much nicer than my original attempt to
fix it.
Thanks,
Karel
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc