[Gambas-user] Gambas setup compile and install script.

Bruce Steers bsteers4 at gmail.com
Wed Oct 14 22:14:48 CEST 2020

> 5) You must detect if there is already a Gambas installation by running
> "gbx3", finding where it is installed to find the Gambas installation
> prefix, and then tell the user before aborting the script (unless you
> can detect if it was installed by package or manually to remove it, but
> I don't think so).

I worked out the following commands listed all installed gambas3 components
only if installed by package manager and listed nothing if installed by

*$(apt list gambas3* 2>/dev/null|grep 'installed'|awk {'print $1'})*

*$(pacman -Qsq gambas3* 2>/dev/null)*
pacman listed just the package names and apt gave a string like
"gambas3-ide/stable,now 3.12.2-1 all [installed,automatic]" so i just split
the string left of the / (not that there is need to with apt as regex* can
be used)

So with apt systems I issue a 'apt-get purge gambas3*'
with pacman i had to provide the list of packages, It's been tested and now
working on both those packagers
I detects the existing installation if present at the start of the script
and informs the user it will be removed just before the 'make install'
command is run.
I did it that way so if the compilation fails the user will still have
their existing gambas installed.

I'm going to have to download and install alpine to get it working for apk


Wishing Well
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20201014/441976ee/attachment.htm>

More information about the User mailing list