system-setup.sh (978B)
1 #!/usr/bin/env bash 2 3 set -ve 4 5 test "$(whoami)" == 'root' 6 7 mkdir -p /setup 8 cd /setup 9 10 apt_packages=() 11 apt_packages+=('curl') 12 apt_packages+=('iproute2') 13 apt_packages+=('locales') 14 apt_packages+=('fzf') 15 apt_packages+=('graphviz') 16 apt_packages+=('python3-pip') 17 apt_packages+=('python-is-python3') 18 apt_packages+=('shellcheck') 19 apt_packages+=('sudo') 20 apt_packages+=('wget') 21 apt_packages+=('unzip') 22 apt_packages+=('tar') 23 apt_packages+=('zstd') 24 25 apt-get update 26 apt-get install "${apt_packages[@]}" 27 28 # Without this we get spurious "LC_ALL: cannot change locale (en_US.UTF-8)" errors, 29 # and python scripts raise UnicodeEncodeError when trying to print unicode characters. 30 locale-gen en_US.UTF-8 31 dpkg-reconfigure locales 32 33 su -c 'git config --global user.email "worker@mozilla.test"' worker 34 su -c 'git config --global user.name "worker"' worker 35 36 cd /build 37 38 ### 39 # ESLint Setup 40 ### 41 42 # install node 43 # shellcheck disable=SC1091 44 . install-node.sh 45 46 npm install -g yarn@1.22.18 47 48 cd / 49 rm -rf /setup