-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bsa-common
executable file
·133 lines (133 loc) · 3.8 KB
/
.bsa-common
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
123
124
125
126
127
128
129
130
131
132
133
# @@@@ not on Linux console, sigh # -*- Shell-Script -*-
_BSA_INPPT=1
case `uname 2>/dev/null`-`tty` in
Linux-/dev/tty[0-9])
;;
ULTRIX-*)
test -t 0 && test -t 1 && stty new erase \^h
;;
*)
test -t 0 && test -t 1 && stty erase \^h
;;
esac
# dash...
if type builtin >/dev/null 2>&1; then
:
else
builtin() {
${1+"$@"}
}
fi
ENV=$HOME/.bashrc export ENV
#case "x$PATH" in
#*/.bin/@* | */opt/local/*) ;;
#*)
nPATH="$HOME/.ghcup/bin:$HOME/.bin/common:$HOME/.bin/@sys:$HOME/.bin:$HOME/bin:"
nPATH="$nPATH:$HOME/.cabal/bin:$HOME/.local/bin:$HOME/.cargo/bin:$HOME/go/bin:/usr/local/go/bin:"
nPATH="$nPATH:/Library/OpenAFS/Tools/etc:/Library/OpenAFS/Tools/bin:/usr/heimdal/sbin:"
nPATH="$nPATH:/usr/athena/bin:/usr/heimdal/bin:/usr/local/bin:/opt/hp/bin:/sw/bin:"
nPATH="$nPATH:/sw/sbin:/opt/local/bin:/opt/local/sbin:/opt/X11/bin:/usr/contributed/bin:"
nPATH="$nPATH:/usr/X11R6/bin:/usr/dt/bin:/usr/openwin/demo:/usr/andy/etc:/usr/afs/etc:"
nPATH="$nPATH:/usr/afsws/etc:/usr/andy/bin:/usr/afs/bin:/usr/afsws/bin:/usr/arla/bin:"
nPATH="$nPATH:/opt/SUNWdat/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/X11/bin:/usr/motif/bin:"
nPATH="$nPATH:/opt/SUNWspro/bin:/usr/ccs/bin:/usr/openwin/bin:/usr/bin:$PATH:/usr/games:"
nPATH="$nPATH:/usr/local/sbin:/usr/local/gnome/bin:/usr/sbin:/sbin:/usr/bin:/bin:/snap/bin"
#;;
#esac
# ugh
# @@@ nuke aliased cd, precmd etc.?
# double ugh: /bin/pwd is somehow getting the logical path on OSX
if [ "x$(pwd -P 2>&1 >/dev/null)" = x ]; then
_pwdp='pwd -P'
else
_pwdp='\pwd'
fi
npath=
oIFS="$IFS"
IFS=:
_quietyinz=1
for dir in $nPATH; do
IFS="$oIFS"
test -d "$dir" || continue
dir="$(builtin cd "$dir"; eval "$_pwdp")" || continue
case "x$npath" in
x"$dir") ;;
x"$dir":*) ;;
*:"$dir":*) ;;
*:"$dir") ;;
*) npath=${npath:+"$npath:"}"$dir" ;;
esac
done
IFS="$oIFS"
test -n "$npath" && PATH="$npath"
eval 'unset npath nPATH'
# hgu
MANPATH=
INFOPATH=
IFS=:
for dir in $PATH; do
IFS="$oIFS"
dir="$(dirname "$dir")"
if test -d "$dir/share/info"; then
INFOPATH="$INFOPATH${INFOPATH:+:}$dir/share/info"
fi
if test -d "$dir/info"; then
INFOPATH="$INFOPATH${INFOPATH:+:}$dir/info"
fi
if test -d "$dir/share/man"; then
MANPATH="$MANPATH${MANPATH:+:}$dir/share/man"
fi
if test -d "$dir/man"; then
MANPATH="$MANPATH${MANPATH:+:}$dir/man"
fi
done
unset _quietyinz
IFS="$oIFS"
export PATH INFOPATH MANPATH
# @@@@ pathify, prefer pg :: less :: more, prefer mine to system
if test -f $HOME/.bin/common/more; then
PAGER=$HOME/.bin/common/more
elif test -f $HOME/.bin/more; then
PAGER=$HOME/.bin/more
elif test -f $HOME/bin/more; then
PAGER=$HOME/bin/more
fi
# @@@@ gack, pmax_ul4 lacks "type". killkillkill...
# @@@@ need a path-searcher. can't use smart one as pmax is a BSD sh and
# @@@@ therefore terminally braindead.
if test -f /usr/athena/bin/pagsh; then
__my_pagsh=/usr/athena/bin/pagsh
elif test -f /usr/local/bin/pagsh; then
__my_pagsh=/usr/local/bin/pagsh
elif test -f /usr/afsws/bin/pagsh; then
__my_pagsh=/usr/afsws/bin/pagsh
elif type pagsh >/dev/null 2>&1; then
__my_pagsh=pagsh
else
__my_pagsh=$SHELL
fi
export __my_pagsh
if [ "x$BASH" != "x" -a -f ./.bashrc ]; then . ./.bashrc; fi
# @@@@ default needs to be pathified
# @@@@ this doesn't work in ksh!
if test -f /opt/local/bin/nvi; then
EDITOR=/opt/local/bin/nvi
elif test -f /usr/local/bin/nvi; then
EDITOR=/usr/local/bin/nvi
elif test -f /usr/local/bin/vi; then
EDITOR=/usr/local/bin/vi
elif test -f /usr/bin/vi; then
EDITOR=/usr/bin/vi
elif test -f /usr/ucb/vi; then
EDITOR=/usr/ucb/vi
fi
GIT_EDITOR="$EDITOR"
VISUAL="$EDITOR"
export EDITOR GIT_EDITOR VISUAL
if test -f $HOME/.rakudobrew/bin/rakudobrew; then
eval "$($HOME/.rakudobrew/bin/rakudobrew init -)"
fi
GHCUP_USE_XDG_DIRS=y
export GHCUP_USE_XDG_DIRS
eval 'unset oIFS'
_BSA_INPPT=