The one really need to be dash-compatible now is chromeos-common.sh (used by installer & others, since /bin/sh on ChromeOS is dash), so I think it may be fine to drop posix sh support for src/scripts/common.sh .
But I agree with Kees - if we're really writing something that cannot be handled by posix sh (dash), then it probably shouldn't be bash, either. And that means trying to keep every scripts POSIX sh compatible is not bad...
Current common.sh is almost dash-compatible, except:
- Few functions (ex, sudo_multi, choose) used bash array
- Some functions start with "function" and should be removed
- Few [[ can be converted to [
So we're not using too much bash-specific syntax except the Array.
Regards,
Hung-Te