Re: [PATCH 2/2] Fix sed usage in tests to work around broken xpg4/sed on Solaris

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 19.07.2015 um 09:37 schrieb Johannes Schindelin:
On 2015-07-19 08:54, Johannes Sixt wrote:
Am 18.07.2015 um 17:21 schrieb Ben Walton:
-	sed -e s/CHANGE_ME/change_me/ <file >file+ &&
-	mv -f file+ file &&
+	perl -pi -e "s/CHANGE_ME/change_me/" file &&

This is problematic. On Windows, perl -i fails when no backup file
extension is specified because perl attempts to replace a file that is
still open; that does not work on Windows.

Let's qualify this a bit better: it actually works with the SDK of
Git  for Windows 2.x.

Good to know!

I really wonder why the previous ">file+ && mv -f file+ file" dance
needs to be replaced?

The sed must be replaced because some versions on Solaris choke on the incomplete last line in the file.

-- Hannes

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]