jrossi / issue-migration-test

GNU General Public License v2.0
1 stars 0 forks source link

"local" is not a valid command in the solaris sh #38

Closed jrossi closed 10 years ago

jrossi commented 10 years ago

Solaris' shell is horrible. Line 49 in src/init/update.sh will not work in Solaris' default shell because "local" is not supported. I'm not entirely sure how to solve this, other than changing _dir_pattern to something we definitely won't see anywhere else. Even then, I'm not a good enough scripter to know of any consequences of not using local.

Line 49: local _dir_pattern="^/[-a-zA-Z0-9/.-]{3,128}$"

The attached patch seems to fix it, but it's not well tested (or understood). I'll try to revisit sometime when I have had some sleep.

Note: This issue has been automatically migrated from Bitbucket Created by ddpbsd on 2013-03-27 17:46:00+00:00, last updated: 2013-03-28 01:23:32+00:00

jrossi commented 10 years ago

Oops

Note: This comment has been automatically migrated from Bitbucket Created by ddpbsd on 2013-03-27 17:46:25+00:00

jrossi commented 10 years ago

The shell variable _dir_pattern does not appear in any other shell scripts, so not using 'local' should be OK. I tested the patch on CentOS and it worked fine.

Note: This comment has been automatically migrated from Bitbucket Created by jbcheng on 2013-03-28 01:23:12+00:00

jrossi commented 10 years ago

Patch integrated.

Note: This comment has been automatically migrated from Bitbucket Created by jbcheng on 2013-03-28 01:23:32+00:00