Improve Cygwin path-stripping code
commiteb648717f20ad28d54ae0d3795346980a9f039f4
authorJohn Stevenson <john-stevenson@blueyonder.co.uk>
Wed, 24 Oct 2012 13:19:16 +0000 (24 15:19 +0200)
committerjohnstevenson <john-stevenson@blueyonder.co.uk>
Sat, 27 Oct 2012 19:21:06 +0000 (27 20:21 +0100)
treeb670d0df37e85d8e51951f8b231f2481c4d326b6
parentb4e03a5a95e1011671ecc33b8dce06b9b1c1cc09
Improve Cygwin path-stripping code

Using awk to strip the Cygwin paths creates a null-byte at the end of the string. This makes the last item in the path unresolvable and causes child processes that are not dependent on msys-1.0.dll to inherit POSIX rather than Windows paths. This routine avoids awk and includes code from nicerobot on StackOverflow: http://stackoverflow.com/a/370255/1127485

Signed-off-by: johnstevenson <john-stevenson@blueyonder.co.uk>
etc/profile