Build the latest Jacktrip on an existing Linux server

Here are some instructions to load and run a script that will build the latest version of Jacktrip on a Linux server.  The script takes great care not to step on your existing Jacktrip.  It builds an executable binary in the /usr/local/bin/ directory with a name that includes the version number.  It will parse what the latest version is (as does this web page) so the new jacktrip, if you run the script right now, will be jacktrip-2.2.2

To be extra safe, the script also looks in /usr/local/bin/ for a program called ‘jacktrip’.  If it finds one, it will parse it’s version and make an executable copy of it in /usr/bin/  — like ‘jacktrip-1.4.2’.  That way you can run your existing version and the newest version side by side to compare how they work.

Here’s how to run the script.  I’ll switch to terminal-speak so the copy/paste will work right…

change directory       cd /usr/local/bin   

get the script         sudo curl -O    

make it executable     sudo chmod +x    

run the script         sudo    

The script will take it from there — it takes about 5 minutes to do the build on an RPi, shorter than that on a Linux machine.  At no time will it touch your existing Jacktrip except to make copies of it.  It may complain about not finding things, but I’m doing my best to make the explanations understandable.  Repeat this whole process each time — that way you’ll pull in any improvements/fixes the next time.

Here’s how it will leave things (it displays this same information each time it runs)

Build complete: Mon 31 Jan 2022 12:21:10 PM CST

Jacktrip has been installed and can be launched from the command line
as: jacktrip-1.5.1

Here are commands to rename it 'jacktrip' if you would like to run it
as your default version.

1) copy 'jacktrip-1.5.1' into 'jacktrip'.
    sudo cp /usr/bin/jacktrip-1.5.1 /usr/bin/jacktrip

2) confirm that it was copied correctly by checking its version
    jacktrip -v

Reminder: the old jacktrip binary (if one was found in /usr/bin/) is still there. 
Copies of it have been made in two locations:

     executable -- /usr/bin/jacktrip-1.3.0
     backup -- /usr/local/etc/JacktripBackups/jacktrip-1.3.0


For nerds…  This was an exercise for me to learn how to parse in Bash.  My parsing style is pretty brute-force.  Grab something, chop off the front, chop off the back.  Perhaps that’s your style too.  I try to comment these scripts at the standard “pretty good” level, so reading it may be useful.