Bug 205753 - [PATCH] mail/automx still contains bash-only code
Summary: [PATCH] mail/automx still contains bash-only code
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Chris Rees
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-12-31 09:26 UTC by Martin Waschbüsch
Modified: 2015-12-31 20:44 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (crees)


Attachments
replace bash-ism by use of sed. (1.94 KB, patch)
2015-12-31 09:28 UTC, Martin Waschbüsch
no flags Details | Diff
replace bash-ism. (1.90 KB, patch)
2015-12-31 15:56 UTC, Martin Waschbüsch
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Waschbüsch 2015-12-31 09:26:33 UTC
mail/automx still contained bash-only code: string expansion with search and replace is not supported by vanilla sh.

Fixed by using sed (patch attached).
Comment 1 Martin Waschbüsch 2015-12-31 09:28:08 UTC
Created attachment 164895 [details]
replace bash-ism by use of sed.

replace bash-ism by use of sed in automx-test.
Comment 2 Chris Rees freebsd_committer freebsd_triage 2015-12-31 09:43:19 UTC
Nice, but doesn't ${AUTODISC##* } do the same?

Chris
Comment 3 Martin Waschbüsch 2015-12-31 15:56:19 UTC
Created attachment 164901 [details]
replace bash-ism.

Indeed, it does!

Just goes to show how little I know about all the magic that is shell... :-)
I'd go with your suggestion - it's way more elegant. (patch updated)
Comment 4 Chris Rees freebsd_committer freebsd_triage 2015-12-31 20:44:30 UTC
Committed.  Thanks!