bashate does not depend on prerequisites
[icn.git] / env / cd_package_installer.sh
1 #!/usr/bin/env bash
2 set -eux -o pipefail
3
4 if [[ $EUID -ne 0 ]]; then
5     echo "This script must be run as root"
6     exit 1
7 fi
8
9 function install_essential_packages {
10     export DEBIAN_FRONTEND=noninteractive
11     apt-get update
12     apt-get -y install \
13     ca-certificates \
14     crudini \
15     curl \
16     dnsmasq \
17     figlet \
18     nmap \
19     patch \
20     psmisc \
21     python3-pip \
22     python3-requests \
23     python3-setuptools \
24     vim \
25     wget \
26     git \
27     software-properties-common
28
29     update-alternatives --install /usr/bin/python python /usr/bin/python3 1
30     update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
31
32     add-apt-repository -y ppa:longsleep/golang-backports
33     apt-get update
34     apt-get install -y golang-go
35 }
36
37 install_essential_packages