[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [SOLVED] Re: wine-unstable 64 bit



Op Thu, 19 Jun 2014 15:18:34 +0200 schreef <berenger.morel@neutralite.org>:

Le 11.06.2014 14:42, Floris a écrit :
If someone have any tips, tricks or commands on the shell script. I
love  to hear them.

if [ "$(dpkg --print-architecture)" = "amd64" -a "$(dpkg --print-foreign-architectures)" != "i386" ]; then

This syntax "$(command)" is not portable.
If you want to write portable scripts, and I guess so since you used "#!/bin/sh", you want the "`command`" syntax.
Otherwise, you want to use "#!/bin/bash".

Other than that, but it is only a coding style potential issue, I would say that mixing "test -foo ... " and "[ -foo ... ]" is quite confusing.


Funny, this part of the script is just a copy-paste from the original one.
But I admit that mixing "test -foo ... " and "[ -foo ... ]" is not neatly

Thanks,

floris


Reply to: