-
Notifications
You must be signed in to change notification settings - Fork 2
/
arch-install-dev-cpp-python-qt
80 lines (77 loc) · 2.91 KB
/
arch-install-dev-cpp-python-qt
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
#!/bin/sh
#
# Installs development tools, such as git, python and gcc.
#
# Also performs refresh of package database and upgrade of existing packages to ensure
# we get latest versions. Runs with the -Syu option, which seems to be the recommended
# approach for normal upgrades on arch, not -Syuu which may also downgrade packages. In
# any case, remember to either do both --refresh (-y) and --sysupgrade (-u), or none of
# them, at least never --refresh (-y) which will easily lead to the partial upgrades syndrome!
#
# Passes any script arguments to the pacman commands, so can execute script with
# --noconfirm for instance to run non-interactively proceeding without prompting
# user.
#
# NOTE: Assumes basic tools are already installed, including sudo.
# Run script ./arch-setup first to ensure this!
#
# NOTE: Does not install package group "base-devel", which contains a lot of the
# relevant packages (gcc, binutils, make, grep, sed, sudo etc), instead just installs
# any wanted packages individually, and e.g. binutils will be included as depedency
# of gcc. Also e.g. pyside2 includes libpng, libjpeg-turbo, icu etc.. used by others.
#
echo "Updating package database, upgrading existing packages, and installing new packages..."
if ! sudo pacman --sync --refresh --sysupgrade --needed "$@" \
`# Diff command` \
diffutils \
`# SSL toolkit (is also dependency of openssh, git and others)` \
openssl \
`# SSH client/server (used with git)` \
openssh \
`# Git client` \
git \
`# Qt 5 (contains also dependencies of pyside2)` \
qt5-base \
qt5-charts \
`# Python 3 (is also optional dependency of boost for python bindings)` \
python \
python-numpy \
python-pylint \
python-pytest \
ipython \
pyside2 \
`# Boost headers and libraries (includes dependency boost-libs which is also dependency of gcc via source-highlight)` \
boost \
`# LevelDB headers and libraries (includes dependency snappy)` \
leveldb \
`# Ninja build-system` \
ninja \
`# CMake build-system generator` \
cmake \
`# GCC compiler` \
gcc \
`# GDB debugger` \
gdb
then
echo "Failed!"
exit 1
fi
# Possible additions
# `# Git client LFS extension (not used for now)` \
# git-lfs \
# `# CCache (to trade disk space for recompilation speed, not installed for now to avoid it being detected and used before configured properly)` \
# ccache \
# `# Valgrind (not used for now, ant this is quite large - 320MiB installed)` \
# valgrind \
#
# # If installing ccache, could then also limit the size from default 5GB to 500MB.
# # Note: This will only have effect for the current user, and will be stored as
# # configuration file ~/.config/ccache/ccache.conf, so must run the script as the
# # intended dev user and not root!
# ccache --set-config max_size=500M
echo
echo "Cleaning package cache..."
if ! pacman --sync --clean "$@"; then
echo "Failed!"
exit 1
fi