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)

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #55655
    m.tarenskeen
    Participant
      • Topics: 30
      • Replies: 113
      • Total: 143
      • ★★

      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 8 years, 8 months ago by m.tarenskeen.
      • This topic was modified 8 years, 8 months ago by m.tarenskeen.
      • This topic was modified 8 years, 8 months ago by m.tarenskeen.
      • This topic was modified 8 years, 8 months ago by m.tarenskeen.
      • This topic was modified 8 years, 8 months ago by m.tarenskeen.
      • This topic was modified 8 years, 8 months ago by m.tarenskeen.
      • This topic was modified 8 years, 8 months ago by m.tarenskeen.
      #55868
      atom
      Keymaster
        • Topics: 159
        • Replies: 2945
        • Total: 3104
        • ★★★★★

        Oh yeah 🙂 sorry for that will fix it asap

        #55889
        m.tarenskeen
        Participant
          • Topics: 30
          • Replies: 113
          • Total: 143
          • ★★

          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 8 years, 8 months ago by m.tarenskeen.
          • This reply was modified 8 years, 8 months ago by m.tarenskeen.
          • This reply was modified 8 years, 8 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 81 guests online
        No users are currently active
        Forum Statistics
        Threads: 2,495, Posts: 17,374, Members: 77,605
        Most users ever online was 12 on January 22, 2019 3:47 pm
        Ctrlr