root/trunk/fink/main/finkinfo/macathena-machtype.patch
Revision 48, 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 /sbin/lspci | awk -F: '/VGA/ {print $3}' | sed -n -e 's/^ //' -e p 136 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 awk '/^SCSI device/ { print; } 142 /^hd[a-z]:/ { print; } 143 /^Floppy/ { for (i=3; i <= NF; i += 3) print $i ": " $(i+2); }' \ 144 /var/log/dmesg 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 145 146 printed=1 146 147 fi 147 148 148 149 if [ $memory ] ; then 150 physmem=$(($(sysctl -n hw.physmem)/1024)) 151 usermem=$(($(sysctl -n hw.usermem)/1024)) 149 152 if [ $verbose ]; then 150 awk 'BEGIN { FS="[^0-9]+" } 151 /^Memory:/ { printf "user=%d, phys=%d (%d M)\n", 152 $2*1.024, $3*1.024, $3/1000; }' \ 153 /var/log/dmesg 153 printf "user=%d, phys=%d (%d M)\n" $usermem $physmem $((physmem/1024)) 154 154 else 155 awk 'BEGIN { FS="[^0-9]+" } 156 /^Memory:/ { printf "%d\n", $3*1.024; }' /var/log/dmesg 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, 40, -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'] 18 19 print 'ATHENA_SYS=%s ATHENA_SYS_COMPAT="%s"' % (versions[0], ':'.join(versions[1:]))
Note: See TracBrowser for help on using the browser.