Review Request 119192: Make shell scripts portable and stable

Vadim Zhukov persgray at gmail.com
Thu Jul 10 07:23:05 UTC 2014



> On Июль 10, 2014, 1:23 д.п., Kevin Funk wrote:
> > util/kdevplatform_shell_environment.sh, line 430
> > <https://git.reviewboard.kde.org/r/119192/diff/3/?file=289495#file289495line430>
> >
> >     *Shrug*. Ugly but it seems there's no way around that under sh.

Yes, it's only way I know (already asked some shell experts).


> On Июль 10, 2014, 1:23 д.п., Kevin Funk wrote:
> > util/kdevplatform_shell_environment.sh, line 557
> > <https://git.reviewboard.kde.org/r/119192/diff/3/?file=289495#file289495line557>
> >
> >     Do we really need this ugly work-arounds with prefixing with 'X'?
> >     
> >     Isn't that really only an issue with ancient shells?

No, that's not a workaround with ancient shells. If the $LOC will be "-n", for example, things will break. Not a security problem, but still.

BTW, more portable way would be '=' (not '=='), as it's the only one mandated by POSIX. ;) But all shells I do know support '==', too.


- Vadim


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119192/#review62022
-----------------------------------------------------------


On Июль 9, 2014, 10:49 п.п., Vadim Zhukov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119192/
> -----------------------------------------------------------
> 
> (Updated Июль 9, 2014, 10:49 п.п.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdevplatform
> 
> 
> Description
> -------
> 
> This patch makes provided scripts run on a generic Unix, and not only on bash-enabled ones. Also, some concepts were changed to more correct ones.
> 
> Patches are both applicable to stable and master branches.
> 
> Please note that I do not have commit rights.
> 
> 
> Diffs
> -----
> 
>   util/kdev_format_source 84434b1 
>   util/kdevplatform_shell_environment.sh 216e8c3 
> 
> Diff: https://git.reviewboard.kde.org/r/119192/diff/
> 
> 
> Testing
> -------
> 
> OpenBSD/i386
> 
> 
> Thanks,
> 
> Vadim Zhukov
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20140710/44e6c81d/attachment.html>


More information about the KDevelop-devel mailing list