2 # generate long version of output from config.guess
4 # Erez Zadok <ezk@cs.columbia.edu>
8 # find a single word that prints the version number of the release
15 # look for one digit followed by a sequence of non-spaces
16 # so it'll catch 7.3 as well as 2.1AW
17 *[0-9]* ) echo $i; return ;;
22 if test "x$GCONFIG" = "x" ; then
23 # find dirname of this script
24 base
=`echo $0 | sed 's/\/[^\/]*$//' 2>/dev/null`
27 GCONFIG
=`config.guess || echo unknown-config`
31 GCONFIG
=`echo ${GCONFIG} | sed -e 's/i.86/i386/' -e 's/linux-gnu/linux/'`
32 if test -f /etc
/redhat-release
; then
33 long
=`getver /etc/redhat-release`
34 if grep 'Red Hat Enterprise Linux' /etc
/redhat-release
> /dev
/null
2>&1 ; then
35 echo ${GCONFIG}-rhel${long}
36 elif grep 'Fedora ' /etc
/redhat-release
> /dev
/null
2>&1 ; then
37 echo ${GCONFIG}-fc${long}
38 elif grep 'CentOS' /etc
/redhat-release
> /dev
/null
2>&1 ; then
39 echo ${GCONFIG}-centos${long}
41 echo ${GCONFIG}-rh${long}
44 elif test -f /etc
/SuSE-release
; then
45 long
=`getver /etc/SuSE-release`
46 if grep 'Enterprise Server' /etc
/SuSE-release
> /dev
/null
2>&1 ; then
47 echo ${GCONFIG}-sles${long}
49 echo ${GCONFIG}-suse${long}
52 elif test -f /etc
/debian_version
; then
53 long
=`getver /etc/debian_version`
54 echo ${GCONFIG}-deb${long}
56 elif test -f /etc
/gentoo-release
; then
57 long
=`getver /etc/gentoo-release`
58 echo ${GCONFIG}-gentoo${long}
60 elif test -f /etc
/yellowdog-release
; then
61 long
=`getver /etc/yellowdog-release`
62 echo ${GCONFIG}-yellowdog${long}
68 *netbsdelf3
* ) # remove trailing '.' from beta
69 echo ${GCONFIG} |
sed 's/\.$//g'
73 if grep -i nexentaos
/etc
/release
> /dev
/null
2>&1 ; then
74 echo ${GCONFIG}-nexentaos