wrong syntax in build.sh for Linux (ctrlr version 5.3.192)

Home Forums Development Other stuff wrong syntax in build.sh for Linux (ctrlr version 5.3.192)

This topic contains 2 replies, has 2 voices, and was last updated by  m.tarenskeen 2 years, 11 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #55655

    m.tarenskeen
    Participant
    • Topics: 26
    • Replies: 98
    • Total: 124
    • ★★

    I was trying to build the latest ctrlr from Git for my Linux machine. Version number 5.3.192
    I bumped into errors in the file

    Builds/Generated/Linux/Standalone/build.sh

    At the beginning of the script I see

    CPUS=`cat /proc/cpuinfo | grep processor | wc -l`
    let JOBS=’CPUS / 4′

    This must be wrong. It will only give the variable JOBS the stringvalue “CPUS / 4”. What you probably want is a value of (for example) JOBS=1 if CPUS=4

    For this you could use the syntax

    let JOBS=$((CPUS/4))

    but this only makes sense if CPUS has a value of 4 or more. Else it will result in JOBS=0

    For now, in my local copy, I just replaced the line with

    JOBS=2

    to be able to run the script, but this might not work for everyone. A better solution is needed.

    • This topic was modified 2 years, 11 months ago by  m.tarenskeen.
    • This topic was modified 2 years, 11 months ago by  m.tarenskeen.
    • This topic was modified 2 years, 11 months ago by  m.tarenskeen.
    • This topic was modified 2 years, 11 months ago by  m.tarenskeen.
    • This topic was modified 2 years, 11 months ago by  m.tarenskeen.
    • This topic was modified 2 years, 11 months ago by  m.tarenskeen.
    • This topic was modified 2 years, 11 months ago by  m.tarenskeen.
    #55868
    atom
    atom
    Moderator
    • Topics: 156
    • Replies: 2940
    • Total: 3096
    • ★★★★★

    Oh yeah 🙂 sorry for that will fix it asap

    #55889

    m.tarenskeen
    Participant
    • Topics: 26
    • Replies: 98
    • Total: 124
    • ★★

    BTW:
    I couldn’t figure out how to highlight this line:

    CPUS=`cat /proc/cpuinfo | grep processor | wc -l`

    as codeblock in this message editor. The backquotes that are important for this code seem to confuse the code syntax?

    • This reply was modified 2 years, 11 months ago by  m.tarenskeen.
    • This reply was modified 2 years, 11 months ago by  m.tarenskeen.
    • This reply was modified 2 years, 11 months ago by  m.tarenskeen.
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

There is currently 0 users and 22 guests online
No users are currently active
Forum Statistics
Threads: 2,143, Posts: 15,125, Members: 11,849
Most users ever online was 5 on March 28, 2018 6:11 pm
Do NOT follow this link or you will be banned from the site!