Changeset fcc0c2 in git


Ignore:
Timestamp:
May 2, 2001, 5:37:43 PM (23 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '82fc009ea2b0098c1a4896c841bb70860976bdfc')
Children:
52af254b210b2de92dfd9181e2b04911c7a4f839
Parents:
4d59e4136d84df15b329a224051e410d9f7ac557
Message:
*hannes: fixed typos


git-svn-id: file:///usr/local/Singular/svn/trunk@5412 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • singuname.sh

    r4d59e4 rfcc0c2  
    11#!/bin/sh
    2 # 
     2#
    33# FILE:    singuname
    44# USAGE:   singuname
    55# PURPOSE: prints to stdout a unique identifier of known uname(s)
    6 # AUTHOR:  obachman 
     6# AUTHOR:  obachman
    77# CREATED: 5/26/98
    88#
     
    1717
    1818# HPUX ########################################################
    19 if (echo $uname_a | $egrep "HP-UX" > $devnull) 
     19if (echo $uname_a | $egrep "HP-UX" > $devnull)
    2020then
    2121    prefix=HPUX
    2222    # HPUX-9
    23     if (echo $uname_a | $egrep "\.09\." > $devnull) 
     23    if (echo $uname_a | $egrep "\.09\." > $devnull)
    2424    then
    25         echo ${prefix}-9
    26         exit 0
     25        echo ${prefix}-9
     26        exit 0
    2727    # HPUX-10
    2828    elif (echo $uname_a | $egrep "\.10\." > $devnull)
    2929    then
    30         echo ${prefix}-10
    31         exit 0
     30        echo ${prefix}-10
     31        exit 0
    3232    else
    33         echo ${prefix}-Unknown
    34         exit 1
     33        echo ${prefix}-Unknown
     34        exit 1
    3535    fi
    3636# Intel ########################################################
     
    4141    if (echo $uname_a | $egrep "CYGWIN" > $devnull)
    4242    then
    43         echo ${prefix}-Win
    44         exit 0
     43        echo ${prefix}-Win
     44        exit 0
    4545    # Linux ###############
    4646    elif (echo $uname_a | $egrep "Linux" > $devnull)
    4747    then
    48         prefix=${prefix}-Linux
    49         if (test -x $file && -x $binary)
    50         then
    51             # LinuxAOUT only if  file does not match ELF
    52             if ($file $binary | $egrep -v "ELF" > $devnull)
    53             then
    54                 echo ${prefix}AOUT
    55                 exit 0
    56             fi
    57         fi
    58         # everything else is assumed to be Linux ELF
     48        prefix=${prefix}-Linux
     49        if (test -x $file && -x $binary)
     50        then
     51            # LinuxAOUT only if  file does not match ELF
     52            if ($file $binary | $egrep -v "ELF" > $devnull)
     53            then
     54                echo ${prefix}AOUT
     55                exit 0
     56            fi
     57        fi
     58        # everything else is assumed to be Linux ELF
    5959        # check for libc5
    6060        if (echo `$ldd $binary` | $egrep "libc.so.5" > $devnull)
    61         then
    62             echo "${prefix}-libc5"
    63         else
    64             echo ${prefix}
    65         fi   
    66         exit 0
     61        then
     62            echo "${prefix}-libc5"
     63        else
     64            echo ${prefix}
     65        fi
     66        exit 0
    6767    else
    68         echo ${prefix}-Unknown
    69         exit 1
     68        echo ${prefix}-Unknown
     69        exit 1
    7070    fi
    7171# SunOS ########################################################
     
    7878      prefix=SunOS
    7979    fi
    80     if (echo $uname_a | $egrep "4\.[0-9]" > $devnull) 
     80    if (echo $uname_a | $egrep "4\.[0-9]" > $devnull)
    8181    then
    82         echo ${prefix}-4
    83         exit 0
    84     # HPUX-10
     82        echo ${prefix}-4
     83        exit 0
     84    # Solaris
    8585    elif (echo $uname_a | $egrep "5\.[0-9]" > $devnull)
    8686    then
    87         echo ${prefix}-5
    88         exit 0
     87        echo ${prefix}-5
     88        exit 0
    8989    else
    90         echo ${prefix}-Unknown
    91         exit 1
     90        echo ${prefix}-Unknown
     91        exit 1
    9292    fi
    9393# DecAlpha ########################################################
     
    9797    if (echo $uname_a | $egrep "Linux" > $devnull)
    9898    then
    99         echo ${prefix}-Linux
    100         exit 0
     99        echo ${prefix}-Linux
     100        exit 0
    101101    else
    102         echo ${prefix}-Unknown
    103         exit 1
     102        echo ${prefix}-Unknown
     103        exit 1
    104104    fi
    105105# IRIX ########################################################
     
    109109    if (echo $uname_a | $egrep "6\.[0-9]" > $devnull)
    110110    then
    111         echo ${prefix}-6
    112         exit 0
     111        echo ${prefix}-6
     112        exit 0
    113113    else
    114         echo ${prefix}-Unknown
    115         exit 1
     114        echo ${prefix}-Unknown
     115        exit 1
    116116    fi
    117117# AIX ########################################################
     
    121121    if (uname -v |  $egrep "4" > $devnull)
    122122    then
    123         echo ${prefix}-4
    124         exit 0
     123        echo ${prefix}-4
     124        exit 0
    125125    elif (uname -v |  $egrep "3" > $devnull)
    126126    then
    127         echo ${prefix}-3
    128         exit 0
     127        echo ${prefix}-3
     128        exit 0
    129129    else
    130         echo ${prefix}-Unknown
    131         exit 1
     130        echo ${prefix}-Unknown
     131        exit 1
    132132    fi
    133133else # Unknown ########################################################
     
    135135    exit 2
    136136fi
    137 
    138 
Note: See TracChangeset for help on using the changeset viewer.