-
Notifications
You must be signed in to change notification settings - Fork 0
/
_mach_type
executable file
·122 lines (119 loc) · 4.41 KB
/
_mach_type
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# -*- shell-script -*-
uname=/nope
if [ -x /bin/uname ]; then
uname=/bin/uname
elif [ -x /usr/bin/uname ]; then
uname=/usr/bin/uname
fi
if [ -x $uname ]; then
hostout=`$uname -a | /usr/bin/tr '[A-Z]' '[a-z]'`
case "$hostout" in
*darwin*)
MACH_TYPE=macosx
X11=/opt/X11/bin
LOCALBIN=/usr/local/bin:/usr/local/sbin:/opt/homebrew/bin:/opt/homebrew/sbin
LOCALBIN=$LOCALBIN:$(/opt/homebrew/bin/brew --prefix coreutils)/libexec/gnubin
LOCALBIN=$LOCALBIN:/sbin:/usr/sbin:/sw/bin:/sw/sbin
MANPATH=$(/opt/homebrew/bin/brew --prefix coreutils)/gnuman:$MANPATH
# setting path for Python 3.4
PREPATH=/Library/Frameworks/Python.framework/Versions/3.4/bin
# suppress the message about the default shell being zsh on
# MacOS versions > Catalina
export BASH_SILENCE_DEPRECATION_WARNING=1
;;
*freebsd*)
MACH_TYPE=fbsd
X11=/usr/X11R6/bin
LOCALBIN=/usr/local/bin:/usr/local/etc:/usr/local/sbin
LOCALBIN=$LOCALBIN:/sbin:/usr/sbin:/usr/local/pilot/bin
;;
*openbsd*)
MACH_TYPE=obsd
X11=/usr/X11R6/bin
LOCALBIN=/usr/local/bin:/usr/local/etc:/usr/local/sbin
LOCALBIN=$LOCALBIN:/sbin:/usr/sbin
;;
*linux*)
MACH_TYPE=linux
X11=/usr/X11R6/bin
LOCALBIN=/usr/local/bin:/usr/local/etc:/usr/local/sbin
LOCALBIN=$LOCALBIN:/sbin:/usr/sbin:/usr/local/nmh/bin
LOCALBIN=$LOCALBIN:/usr/local/jdk1.2.2/bin
# strip out system provided aliases
unalias -a
;;
*sun*)
MACH_TYPE=$(/bin/arch)
X11=/usr/openwin/bin:/usr/openwin/bin/xview
LOCALBIN=/usr/local/bin:/usr/local/etc:/usr/local/sbin
LOCALBIN=$LOCALBIN:/opt/bin:/sbin:/usr/sbin:/usr/ccs/bin
LOCALBIN=$LOCALBIN:$HOME/lib/Office51/bin:/usr/local/ar/bin
LOCALBIN=$LOCALBIN:/usr/local/nmh/bin
LOCALBIN=$LOCALBIN:/home/proj/partnet/ws3/SUNWspro/bin
LD_LIBRARY_PATH=/usr/openwin/lib
MANPATH=/usr/man:/usr/share/man:/usr/local/man:/usr/openwin/share/man
OPENWINHOME=/usr/openwin
XFILESEARCHPATH=$OPENWINHOME/lib/locale/%L/%T/%N%S:$OPENWINHOME/lib/%T/%N%S
export LD_LIBRARY_PATH MANPATH OPENWINHOME XFILESEARCHPATH
alias killall="echo ALERT! you said killall on solaris!"
;;
*irix*)
MACH_TYPE=irix
X11=/usr/bin/X11:/usr/sbin:/usr/demos/bin
LOCALBIN=/usr/local/bin:/usr/local/etc:/usr/local/games:/usr/bsd
LOCALBIN=${LOCALBIN}:/usr/local/news/bin
LOCALBIN=/usr/kerberos/bin:${LOCALBIN}
;;
*mips*)
MACH_TYPE=mips
X11=/usr/local/X11R5/bin:/usr/bin/X11
X11=${X11}:/usr/RISCwindows4.0/contrib/bin
X11=${X11}:/usr/RISCwindows4.0/demos/bin:/usr/local/X11R4/bin
LOCALBIN=/usr/gnu/bin:/usr/local/bin:/usr/local/etc
LOCALBIN=${LOCALBIN}:/usr/local/games
LOCALBIN=${LOCALBIN}:/usr/bsd43/bin:/usr/local/news/bin
;;
*hp-ux*)
MACH_TYPE=hp
X11=/usr/local/bin/X11:/usr/contrib/bin/X11:/usr/bin/X11
LOCALBIN=/usr/local/bin:/usr/local/etc:/usr/contrib/bin
LOCALBIN=${LOCALBIN}:/usr/contrib/games
;;
*cygwin*)
MACH_TYPE=cygwin
cyg="/cygcrive/c/Program Files"
X11="${cyg}/Broadcom/Broadcom 802.11/Driver"
X11="${X11}:${cyg}/Common Files/Microsoft Shared/Windows Live"
X11="${X11}:${cyg} (x86)/Common Files/Microsoft Shared/Windows Live"
X11="${X11}:/cygdrive/c/Windows/system32"
X11="${X11}:/cygdrive/c/Windows"
X11="${X11}:/cygdrive/c/Windows/System32/Wbem"
X11="${X11}:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0"
X11="${X11}:${cyg} (x86)/Common Files/Roxio Shared/DLLShared"
X11="${X11}:${cyg} (x86)/Common Files/Roxio Shared/DLLShared"
X11="${X11}:${cyg} (x86)/Common Files/Roxio Shared/12.0/DLLShared"
X11="${X11}:${cyg} (x86)/Windows Live/Shared"
X11="${X11}:${cyg}/WIDCOMM/Bluetooth Software"
X11="${X11}:${cyg}/WIDCOMM/Bluetooth Software/syswow64"
X11="${X11}:${cyg}/Broadcom/WHL"
X11="${X11}:${cyg}/Broadcom/WHL/syswow64"
X11="${X11}:${cyg}/Broadcom/WHL/SysWow64"
X11="${X11}:${cyg}/Broadcom/WHL/SysWow64/syswow64"
X11="${X11}:${cyg} (x86)/GNU/GnuPG/pub"
X11="${X11}:${cyg} (x86)/Nmap"
LOCALBIN=/usr/local/bin
;;
*)
MACH_TYPE=unknown
X11=/usr/bin/X11
LOCALBIN=/usr/local/bin
;;
esac
unset hostout
else
# some reasonable defaults
MACH_TYPE=unknown
X11=/usr/bin/X11
LOCALBIN=/usr/local/bin
fi
export MACH_TYPE