Skip to contentSkip to conversation

braille: fix computation with old bash

PATCH Applied Samuel Thibault 2 participants 6 messages Oct 29, 2017 – Nov 6, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 braille: fix computation with old bash

Hello,

Old bash does not like quotes in $(("123" + 0)) , the attached patch removes these unneeded quotes.

Samuel

=== modified file 'filter/braille/filters/cups-braille.sh.in'

braille/filters/cups-braille.sh.in +3 -3
@@ -173,9 +173,9 @@ points2mm() {
   FRAC_POINTS="$INT_POINTS$FRAC_POINTS"
   # Then we can compute conversion
   # We round up to be safe
-  FRAC_INCH=$((("$FRAC_POINTS" + 71) / 72))
-  FRAC_CM=$((("$FRAC_INCH" * 254 + 99) / 100))
-  HUNDRENDTH_MM=$((("$FRAC_CM" + 999999999999) / 1000000000000))
+  FRAC_INCH=$((($FRAC_POINTS + 71) / 72))
+  FRAC_CM=$((($FRAC_INCH * 254 + 99) / 100))
+  HUNDRENDTH_MM=$((($FRAC_CM + 999999999999) / 1000000000000))
   echo $HUNDRENDTH_MM
 }
 
#1 lore raw
Quoted 2 lines · Samuel Thibault

Old bash does not like quotes in $(("123" + 0)) , the attached patch removes these unneeded quotes.

Applied, thank you very much.

Till

#2 lore raw

Hello,

Quoted 5 lines · Till Kamppeter, on dim. 29 oct. 2017 21:15:22 -0200, wrote:
Quoted 2 lines · Samuel Thibault

Old bash does not like quotes in $(("123" + 0)) , the attached patch removes these unneeded quotes.

Applied, thank you very much.

I don't see it appearing on bzr http://bzr.openprinting.org/cups-filters/ or
http://bzr.linuxfoundation.org/loggerhead/openprinting/cups-filters/changes

Did you perhaps forget to push, or is there perhaps some staging phase?

Samuel

#3 lore raw
Quoted 7 lines · Samuel Thibault

Hello,

Quoted 4 lines · Till Kamppeter, on dim. 29 oct. 2017 21:15:22 -0200, wrote:
Quoted 2 lines · Samuel Thibault

Old bash does not like quotes in $(("123" + 0)) , the attached patch removes these unneeded quotes.

Quoted 9 lines
Quoted 1 line

Applied, thank you very much.

I don't see it appearing on bzr http://bzr.openprinting.org/cups-filters/ or
http://bzr.linuxfoundation.org/loggerhead/openprinting/cups-filters/changes

Did you perhaps forget to push, or is there perhaps some staging phase?

Samuel

Forgot to tell you that I moved to GIT. The repo is now here:

https://github.com/OpenPrinting/cups-filters

Till

#4 lore raw

Hello,

Quoted 8 lines · Till Kamppeter, on dim. 05 nov. 2017 15:18:43 -0200, wrote:
Quoted 7 lines · Samuel Thibault
Quoted 5 lines · Till Kamppeter, on dim. 29 oct. 2017 21:15:22 -0200, wrote:
Quoted 2 lines · Samuel Thibault

Old bash does not like quotes in $(("123" + 0)) , the attached patch removes these unneeded quotes.

Applied, thank you very much.

Quoted 8 lines
Quoted 4 lines

I don't see it appearing on bzr http://bzr.openprinting.org/cups-filters/ or
http://bzr.linuxfoundation.org/loggerhead/openprinting/cups-filters/changes

Did you perhaps forget to push, or is there perhaps some staging phase?

Forgot to tell you that I moved to GIT. The repo is now here:

https://github.com/OpenPrinting/cups-filters

Ok, this needs to be updated:

https://wiki.linuxfoundation.org/openprinting/cups-filters

Samuel