root/trunk/fink/main/finkinfo/macathena-machtype.patch
Revision 133, 2.5 kB (checked in by broder, 17 years ago) |
---|
-
machtype_linux.sh
old new 1 #!/bin/ sh1 #!/bin/bash 2 2 # $Id: machtype_linux.sh,v 1.9 2003-08-12 21:47:50 jweiss Exp $ 3 3 4 4 # We need to support the following options: … … 86 86 fi 87 87 88 88 if [ $syspacks ]; then 89 echo " Linuxdoes not use system packs." >&289 echo "MacAthena does not use system packs." >&2 90 90 printed=1 91 91 fi 92 92 … … 133 133 fi 134 134 135 135 if [ $display ] ; then 136 lspci | awk -F: '/VGA/ {print $3}' | sed -n -e 's/^ //' -e p136 system_profiler SPDisplaysDataType | awk 'NR==3 { print }' | sed "s/^ *\(.*\):$/\1/" 137 137 printed=1 138 138 fi 139 139 140 140 if [ $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 147 146 printed=1 148 147 fi 149 148 150 149 if [ $memory ] ; then 151 if [ $verbose ]; then152 awk '/^MemTotal:/ { printf "user=%d, phys=%d (%d M)\n",153 $2, $2, $2/1024 }' \ 154 /proc/meminfo155 else156 awk '/^MemTotal:/ { printf "%d\n", $2 }' /proc/meminfo150 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 157 156 fi 158 157 printed=1 159 158 fi 160 159 161 160 if [ $printed -eq '0' ] ; then 162 echo linux161 echo darwin 163 162 fi 164 163 exit 0 -
getSysnameList.py
old new 1 #!/usr/bin/env python 2 3 from commands import getoutput 4 5 arch = getoutput('arch') 6 darwin_ver = int(getoutput('uname -r').split('.')[0]) * 10 7 8 ver_list = range(darwin_ver, 70, -10) 9 x86_list = ["x86_darwin_%d" % ver for ver in ver_list] 10 ppc_list = ["ppc_darwin_%d" % ver for ver in ver_list] 11 12 if arch == 'i386': 13 versions = [item for items in zip(x86_list, ppc_list) for item in items] 14 else: 15 versions = ppc_list 16 17 versions += ['share', 'common', 'any', 'all'] 18 19 print 'ATHENA_SYS=%s ATHENA_SYS_COMPAT="%s"' % (versions[0], ':'.join(versions[1:]))
Note: See TracBrowser for help on using the browser.