Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Please fix bashism scripts #215

Closed
zh-jq opened this issue Jul 19, 2015 · 3 comments
Closed

Please fix bashism scripts #215

zh-jq opened this issue Jul 19, 2015 · 3 comments

Comments

@zh-jq
Copy link

zh-jq commented Jul 19, 2015

Two /bin/sh scripts have bashism problems. Please fix them.
One is data/env_setup.sh (Line 34)
Another one is src/ui/classic/fcitx-skin-installer.sh (Line 28 and 55)

Moreinfo:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=772253
Patch included there too.

Thanks

@yuyichao
Copy link
Member

The bug report only mentioned the first issue data/env_setup.sh:34. The second script shouldn't have any issue with /bin/sh (the specific lines passed tests with dash).

The patch attached in the bug report introduce a logical error on src/ui/classic/fcitx-skin-installer.sh:55.

@yuyichao
Copy link
Member

Please correct me if I'm wrong but it seems that the type utility is part of the standard

@zh-jq
Copy link
Author

zh-jq commented Jul 20, 2015

There's one XSI tag in type's SYNOPSIS section.
And here is some text from man checkbashisms

Note that the definition of a bashism in this context roughly equates to "a shell feature that is not required to be supported by POSIX"; this means that some issues flagged may be permitted under optional sections of POSIX, such as XSI or User Portability.

In cases where POSIX and Debian Policy disagree, checkbashisms by default allows extensions permitted by Policy but may also provide options for stricter checking.

It will be good if checkbashisms reports nothing.
Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants