The installers have some issues (mostly with quotes)

Post Reply New Topic
RELATED
PRODUCTS

Post

AUTO-ADMIN: Non-MP3, WAV, OGG, SoundCloud, YouTube, Vimeo, Twitter and Facebook links in this post have been protected automatically. Once the member reaches 5 posts the links will function as normal.
Hello,

I wanted to update my installation of Zebra 2. So I downloaded the 12092 version (https://dl.u-he.com/releases/Zebra_Legacy_293_12092_Linux.zip), unpacked it, unpacked the `01 Zebra2/Zebra2_293_12092_Linux.tar.xz` archive and ran the `install.sh` file.

And I got this:

Code: Select all (#)

/some/folder/on/my/machine/01 Zebra2/Zebra2-12092/install.sh: line 4: cd: too many arguments
Looking at line 4, it's missing the double quotes that would prevent splitting on the output of `dirname`:

Code: Select all (#)

cd $(dirname "$0")
This is especially bad with Zebra, since the archive is in the `01 Zebra2` folder, and so it's quote likely that the user ends up running the install script in a path with a space in it.

I also ran `shellcheck` on the install script and got these other issues:

Code: Select all (#)

In install.sh line 30:
    if test $ARCH = x86_64; then
            ^---^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
    if test "$ARCH" = x86_64; then


In install.sh line 44:
        VSTDIR="$(eval echo $VSTDIR)"
                            ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
        VSTDIR="$(eval echo "$VSTDIR")"


In install.sh line 48:
        VST3DIR="$(eval echo $VST3DIR)"
                             ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
        VST3DIR="$(eval echo "$VST3DIR")"


In install.sh line 79:
        echo Please do not install as root.
                    ^-- SC1010 (warning): Use semicolon or linefeed before 'do' (or quote to make it literal).


In install.sh line 100:
            read answer
            ^--^ SC2162 (info): read without -r will mangle backslashes.


In install.sh line 133:
if test $(uname -m) = x86_64; then
        ^---------^ SC2046 (warning): Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC1010 -- Use semicolon or linefeed before ...
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
It might be worth fixing some of these.

BTW is it necessary to eval the contents of `VSTDIR` and `VST3DIR`? That's a bit suspicious and potentially dangerous - a semicolon in the path (rare, I know, but could happen) would result in the rest of the path being interpreted as a command. If my home folder were called `/home/john;rm -rf ~` then I definitely wouldn't be happy.

I also tried running shellcheck on other install scripts (for Diva, Hive, Presswerk and Twangström) and they all have the same issues (I suppose that you use the same template for everything).

Anyway, I'll fix the Zebra installer for myself so that I can install it. And thank you very much for these Linux versions of your plugins, it's very liberating not having to deal with Windows or Mac and still being able to use these kickass plugins :wink:

Edit: Just realized that the VSTDIR and VST3DIR variables are only evalled when the --vstdir and --vst3dir arguments are provided, so it's not that bad. It's still not great though.

Post

I don't have enough Linux knowledge to give you an answer other than "it worked over here". :)
I'll let the developers know so they can check and adjust things, if necessary.
That QA guy from planet u-he.

Post

Yeah, it works if you extract the archive into a path which has no spaces in it. But if there's spaces or any other funny characters, things may break.

Anyway, thanks!

Post Reply

Return to “u-he Linux support”