Opened 9 years ago
Last modified 9 years ago
#15233 closed defect
Fix bashism in josm launcher — at Version 1
| Reported by: | sebastic | Owned by: | bastiK |
|---|---|---|---|
| Priority: | normal | Milestone: | 17.09 |
| Component: | Ubuntu package | Version: | |
| Keywords: | linux shell bash | Cc: | sebastic |
Description (last modified by )
The recent Java 9 change (SVN r12713) to the josm launchers introduced a bashism, the test only works when bash is configured as /bin/sh:
$ checkbashisms linux/*/usr/bin/josm*
possible bashism in linux/latest/usr/bin/josm-latest line 49 (alternative test command ([[ foo ]] should be [ foo ])):
if [[ $JAVACMD == *"java-9"* ]]; then
possible bashism in linux/latest/usr/bin/josm-latest line 49 (should be 'b = a'):
if [[ $JAVACMD == *"java-9"* ]]; then
possible bashism in linux/tested/usr/bin/josm line 49 (alternative test command ([[ foo ]] should be [ foo ])):
if [[ $JAVACMD == *"java-9"* ]]; then
possible bashism in linux/tested/usr/bin/josm line 49 (should be 'b = a'):
if [[ $JAVACMD == *"java-9"* ]]; then
The attached patch changes the test to use expr(1) which should be portable to all shells.
Change History (2)
by , 9 years ago
| Attachment: | bashisms.patch added |
|---|
comment:1 by , 9 years ago
| Description: | modified (diff) |
|---|
Note:
See TracTickets
for help on using tickets.


