Op Thu, 19 Jun 2014 15:18:34 +0200 schreef <berenger.mo...@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
--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/op.xhpsma0a5k9...@alice.jkfloris.demon.nl