[Scons-users] Distinguishing platforms

Bill Deegan bill at baddogconsulting.com
Mon Aug 24 13:11:24 EDT 2015


Russel,

lsb_release the best tool I know to identify which distro/release you are
on.

You need to add arguments to lsb_release.. (-h or manpage will show u)

bdbaddog at hpmicrodog:~$ lsb_release
No LSB modules are available.
bdbaddog at hpmicrodog:~$ lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 14.04.3 LTS
Release:    14.04
Codename:    trusty
bdbaddog at hpmicrodog:~$ lsb_release -h
Usage: lsb_release [options]

Options:
  -h, --help         show this help message and exit
  -v, --version      show LSB modules this system supports
  -i, --id           show distributor ID
  -d, --description  show description of this distribution
  -r, --release      show release number of this distribution
  -c, --codename     show code name of this distribution
  -a, --all          show all of the above information
  -s, --short        show requested information in short format



If it's not installed you can default to looking at /etc/redhat-release and
other equivalent files.
Debian has:
$ cat /etc/debian_version
jessie/sid

Beyond that it's gonna get very very messy to look at kernel versions and
search for tools etc..

I don't think there's a ready made configure context check for this.

-Bill

On Mon, Aug 24, 2015 at 10:40 AM, Russel Winder <russel at winder.org.uk>
wrote:

> On Sat, 2015-08-22 at 14:18 -0400, Bill Deegan wrote:
> > Russel,
> >
> > lsb_release will usually tell you what you want to know (run on the
> > command
> > line).
> > That said, perhaps this is a good candidate for configure context
> > checker?
>
>
> |> lsb_release
> No LSB modules are available.
>
> Not entirely helpful :-(
>
> This assumes the lsb-release package is installed of course:
>
> |> lsb_release
> -bash: /usr/bin/lsb_release: No such file or directory
>
>
> Is there a ready-made confguration set-up for handling this already?
>
>
> --
> Russel.
>
> =============================================================================
> Dr Russel Winder      t: +44 20 7585 2200   voip:
> sip:russel.winder at ekiga.net
> 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
> London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150824/a8f3ee45/attachment-0001.html>


More information about the Scons-users mailing list