root/trunk/fink/main/finkinfo/macathena-machtype.patch

Revision 133, 2.5 kB (checked in by broder, 16 years ago)

Taking new versions of things that have changed upstream

  • machtype_linux.sh

    old new  
    1 #!/bin/sh 
     1#!/bin/bash 
    22# $Id: machtype_linux.sh,v 1.9 2003-08-12 21:47:50 jweiss Exp $ 
    33 
    44# We need to support the following options: 
     
    8686fi 
    8787 
    8888if [ $syspacks ]; then 
    89         echo "Linux does not use system packs." >&2 
     89        echo "MacAthena does not use system packs." >&2 
    9090        printed=1 
    9191fi 
    9292 
     
    133133fi 
    134134 
    135135if [ $display ] ; then 
    136         lspci | awk -F: '/VGA/ {print $3}' | sed -n -e 's/^ //' -e p 
     136        system_profiler SPDisplaysDataType | awk 'NR==3 { print }' | sed "s/^ *\(.*\):$/\1/" 
    137137        printed=1 
    138138fi 
    139139 
    140140if [ $rdsk ]; then 
    141         for d in /sys/block/[fhs]d*; do 
    142             echo $(basename "$d"): \ 
    143                 $(xargs -I @ expr @ '*' 8 / 15625 < "$d/size")MB \ 
    144                 $(cat "$d/device/model" || 
    145                   cat "/proc/ide/$(basename "$d")/model") 
    146         done 2>/dev/null 
     141        disks=`ls /dev/disk* | grep 'disk[0-9]*$'` 
     142        for disk in $disks 
     143        do 
     144                printf "%s: %s GB\n" "$(basename $disk)" "$(diskutil info "$disk" | awk '$1=="Total" { print  $3 }')" 
     145        done 
    147146        printed=1 
    148147fi 
    149148 
    150149if [ $memory ] ; then 
    151         if [ $verbose ]; then 
    152                awk '/^MemTotal:/ { printf "user=%d, phys=%d (%d M)\n", 
    153                                            $2, $2, $2/1024 }' \ 
    154                     /proc/meminfo 
    155       else 
    156                 awk '/^MemTotal:/ { printf "%d\n", $2 }' /proc/meminfo 
     150        physmem=$(($(sysctl -n hw.physmem)/1024)) 
     151        usermem=$(($(sysctl -n hw.usermem)/1024)) 
     152        if [ $verbose ]; then 
     153                printf "user=%d, phys=%d (%d M)\n" $usermem $physmem $((physmem/1024)) 
     154      else 
     155                echo $physmem 
    157156        fi 
    158157        printed=1 
    159158fi 
    160159 
    161160if [ $printed -eq '0' ] ; then 
    162         echo linux 
     161        echo darwin 
    163162fi 
    164163exit 0 
  • getSysnameList.py

    old new  
     1#!/usr/bin/env python 
     2 
     3from commands import getoutput 
     4 
     5arch = getoutput('arch') 
     6darwin_ver = int(getoutput('uname -r').split('.')[0]) * 10 
     7 
     8ver_list = range(darwin_ver, 70, -10) 
     9x86_list = ["x86_darwin_%d" % ver for ver in ver_list] 
     10ppc_list = ["ppc_darwin_%d" % ver for ver in ver_list] 
     11 
     12if arch == 'i386': 
     13        versions = [item for items in zip(x86_list, ppc_list) for item in items] 
     14else: 
     15        versions = ppc_list 
     16 
     17versions += ['share', 'common', 'any', 'all'] 
     18 
     19print 'ATHENA_SYS=%s ATHENA_SYS_COMPAT="%s"' % (versions[0], ':'.join(versions[1:])) 
Note: See TracBrowser for help on using the browser.