forked from leoheck/kiri
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_dependencies.sh
executable file
·91 lines (78 loc) · 2.1 KB
/
install_dependencies.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
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
#!/bin/bash
get_os_name() {
case "$OSTYPE" in
solaris*) echo "SOLARIS" ;;
darwin*) echo "OSX" ;;
linux*) echo "LINUX" ;;
msys*) echo "WINDOWS" ;;
bsd*) echo "BSD" ;;
*) echo "unknown" ;;
esac
}
os=$(get_os_name)
# Basic dependencies for Linux/WSL
if [[ $os == "LINUX" ]]; then
sudo apt update
sudo apt install -y git
sudo apt install -y libgmp-dev
sudo apt install -y pkg-config
sudo apt install -y opam
sudo apt install -y python3-pip
sudo apt install -y kicad
sudo apt install -y dos2unix
sudo apt install -y coreutils
sudo apt install -y zenity
sudo apt install -y dune
sudo apt install -y scour
sudo apt install -y librsvg2-bin
fi
if [[ $os == "OSX" ]]; then
sudo spctl --master-disable
# Download and Install Kicad for OSX - https://www.kicad.org/download/macos/
if [ ! -d "/Applications/KiCad/kicad.app" ]
then
curl -Lo ~/Downloads/kicad.dmg https://osdn.net/projects/kicad/storage/kicad-unified-5.1.12-1-10_14.dmg
sudo hdiutil attach ~/Downloads/kicad.dmg
sudo cp -R /Volumes/KiCad/KiCad /Applications/
sudo cp -R /Volumes/KiCad/kicad "/Volumes/KiCad/Application Support/"
sudo hdiutil unmount /Volumes/KiCad
rm -rf ~/Downloads/kicad.dmg
fi
# Install homebrew
if ! which brew &> /dev/null; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
brew install git
# Opam dependencies
brew install gmp
brew install pkg-config
brew install opam
brew install dune
# KiRI dependencies
brew install gsed
brew install findutils
brew install dos2unix
brew install coreutils
brew install scour
brew install wxpython
brew install wxwidgets
brew install librsvg
fi
# Kicad-Diff dependencies
pip3 install python_dateutil
# Initialize Opam
if [[ ! -d "$HOME/.opam/4.09.1" ]]; then
opam init --disable-sandboxing --reinit
opam switch create 4.09.1
fi
opam switch 4.09.1
eval "$(opam env)"
# Plotgitsch dependencies
opam install -y digestif
opam install -y lwt
opam install -y lwt_ppx
opam install -y cmdliner
opam install -y base64
opam install -y sha
opam install -y tyxml
opam install -y git-unix