-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinit.sh
50 lines (44 loc) · 1.89 KB
/
init.sh
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
#!/bin/bash
BH_LIB="$(dirname "${BASH_SOURCE[0]}")/lib"
if [ -z "${BH_BIN}" ]; then BH_BIN="$HOME/bin"; fi
#########################
# load os_*.bash files
#########################
source "$BH_LIB/os_any.bash"
case $OSTYPE in
msys*)
source "$BH_LIB/os_win.bash"
alias ghostscript='gswin64.exe'
;;
linux*)
source "$BH_LIB/os_linux.bash"
if [[ -n $WSL_DISTRO_NAME ]]; then source "$BH_LIB/os_win.bash"; fi
;;
darwin*)
source "$BH_LIB/os_mac.bash"
;;
esac
#########################
# load <tool>.bash files
#########################
if type adb &>/dev/null; then source "$BH_LIB/adb.bash"; fi
if type cmake &>/dev/null; then source "$BH_LIB/cmake.bash"; fi
if type docker &>/dev/null; then source "$BH_LIB/docker.bash"; fi
if type ffmpeg &>/dev/null; then source "$BH_LIB/ffmpeg.bash"; fi
if type flutter &>/dev/null; then source "$BH_LIB/flutter.bash"; fi
if type ghostscript &>/dev/null; then source "$BH_LIB/ghostscript.bash"; fi
if type git &>/dev/null; then source "$BH_LIB/git.bash"; fi
if type gst-launch-1.0 &>/dev/null; then source "$BH_LIB/gst.bash"; fi
if type latexmk &>/dev/null; then source "$BH_LIB/latex.bash"; fi
if type lxc &>/dev/null; then source "$BH_LIB/lxc.bash"; fi
if type meson &>/dev/null; then source "$BH_LIB/meson.bash"; fi
if type pandoc &>/dev/null; then source "$BH_LIB/pandoc.bash"; fi
if type pkg-config &>/dev/null; then source "$BH_LIB/pkg-config.bash"; fi
if type pngquant &>/dev/null; then source "$BH_LIB/pngquant.bash"; fi
if type python &>/dev/null; then source "$BH_LIB/python.bash"; fi
if type ruby &>/dev/null; then source "$BH_LIB/ruby.bash"; fi
if type ssh &>/dev/null; then source "$BH_LIB/ssh.bash"; fi
if type tesseract &>/dev/null; then source "$BH_LIB/tesseract.bash"; fi
if type wget &>/dev/null; then source "$BH_LIB/wget.bash"; fi
if type youtube-dl &>/dev/null; then source "$BH_LIB/youtube-dl.bash"; fi
if type zip &>/dev/null; then source "$BH_LIB/zip.bash"; fi