Update Linbpq with up2bpq

Ok, first of all I want to apologize for my fantastic bash scripting arts. There must be people laughing there ass off.

I was searching the internet for an update program or script for Linbpq. I could not find these, so I started using my bash scripting skills.

Maybe someone has better ideas.

The problem is that John GM8BPQ does not work with version numbers in his program names. This makes it difficult to quickly see if you need to update. Now I always look at the dates, this gave me an idea.

Why not look at the Last_Modified date with a shell script. Now of course you first have to check on your own system which date you have with your most recent Linbpq program file.

Okay now we have to take a look at John’s date on his web server.

Now you have two dates, lets compare.

It should be  “if (( ${local//-/} < ${remote//-/} ));”

The local file is from 2019-09-26 and de remote file is from 2019-10-05
Let get the new Linbpq version from 2019-10-05 and downloading it with a timestamp. I want the timestamp to remain the same, otherwise nothing later can be compared.

The -N oprions by the wget command stands for –Timestammping

Now I want to name the file linbpq with the date of the download and copy it to the directory /home/pd9q/linbpq. If you use the -p option with cp the timestamp stays the same. And I also have the file in the /home/pd9q/linbpq/check directory. This is because I need it to compare the dates.

Let`s remove pilinbpq, we no longer need him. And chmod the linbpq file so we can execute it.

I’m using the sed command to alter the linbpq start file.

That works very well.

Now let’s restart Linbpq with the new version of Linbpq

If you now run up2bpq again you will get the following message if the two dates match.

Here is the entire script.

2 thoughts on “Update Linbpq with up2bpq”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.