Page MenuHomeFreeBSD

zdiff: avoid non-conformant features
ClosedPublic

Authored by kevans on May 20 2022, 8:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 21, 12:15 PM
Unknown Object (File)
Wed, May 15, 6:59 PM
Unknown Object (File)
Tue, May 14, 7:43 AM
Unknown Object (File)
Mon, May 13, 8:16 AM
Unknown Object (File)
Wed, May 8, 12:01 PM
Unknown Object (File)
Apr 26 2024, 3:59 AM
Unknown Object (File)
Apr 24 2024, 8:25 PM
Unknown Object (File)
Apr 23 2024, 5:13 PM
Subscribers

Details

Summary

setvar is a non-conformant feature that looks slightly neater but is
not portable to other /bin/sh implementations. Making the script
portable is straightforward, so let's do it.

Tests are added to make sure that I didn't break anything major in the
process.

Sponsored by: Klara, Inc.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 45650
Build 42538: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.May 21 2022, 12:27 PM
jilles requested changes to this revision.May 21 2022, 1:36 PM
jilles added inline comments.
usr.bin/gzip/zdiff
41

This used to work with filenames containing ", ` and $ but no longer does. Likewise for all other eval "$2= below.

This revision now requires changes to proceed.May 21 2022, 1:36 PM
kevans marked an inline comment as done.

Fix files containing ", `, and $. Add tests to cover those names, as well, for
all of these cases.

This revision is now accepted and ready to land.May 26 2022, 4:35 PM
This revision was automatically updated to reflect the committed changes.