-
Notifications
You must be signed in to change notification settings - Fork 2
/
arch-install-dev-go
72 lines (63 loc) · 2.05 KB
/
arch-install-dev-go
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
#!/bin/sh
#
# Installs development environment for Go (golang), including gcc (for cgo),
# and supporting tools such as git.
#
# 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!
#
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 \
`# GCC compiler` \
gcc \
`# Go compiler` \
go
then
echo "Failed!"
exit 1
fi
# Go dev support tools (but can be installed from VSCode or with "go get" command instead)
# `# Go basic support tools (goimports, guru, etc)` \
# go-tools
# `# Go additional support tools (delve, gopls, staticcheck)` \
# delve
# gopls
# staticcheck
# `# Fuse library to be able to use cgofuse` \
# fuse2
# `# Python 3 (for utility scripts)` \
# python \
# python-pylint \
# python-pytest \
# ipython \
# `# Full CMake/Ninja build system for C++` \
# `# Ninja build-system` \
# ninja \
# `# CMake build-system generator` \
# cmake \
# `# Alternative Go compiler, based on GCC` \
# gcc-go
echo
echo "Cleaning package cache..."
if ! pacman --sync --clean "$@"; then
echo "Failed!"
exit 1
fi