forked from siliconcompiler/siliconcompiler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-klayout.sh
executable file
·33 lines (26 loc) · 1.02 KB
/
install-klayout.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
#!/bin/sh
set -e
# Get directory of script
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)
mkdir -p deps
cd deps
pkg_version=$(python3 ${src_path}/_tools.py --tool klayout --field version)
version=$(lsb_release -sr)
if [ "$version" = "18.04" ]; then
url="https://www.klayout.org/downloads/Ubuntu-18/klayout_${pkg_version}-1_amd64.deb"
elif [ "$version" = "20.04" ]; then
url="https://www.klayout.org/downloads/Ubuntu-20/klayout_${pkg_version}-1_amd64.deb"
elif [ "$version" = "22.04" ]; then
url="https://www.klayout.org/downloads/Ubuntu-22/klayout_${pkg_version}-1_amd64.deb"
else
echo "Script doesn't support Ubuntu version $version."
fi
# Fetch package
wget -O klayout.deb $url
# Install dependencies
sudo apt-get install -y libqt5core5a libqt5designer5 libqt5gui5 libqt5multimedia5 \
libqt5multimediawidgets5 libqt5network5 libqt5opengl5 libqt5printsupport5 \
libqt5sql5 libqt5svg5 libqt5widgets5 libqt5xml5 libqt5xmlpatterns5 libruby2.7
# Install package
sudo dpkg -i klayout.deb
cd -