Linux workstation setup script

Last updated: 28 March 2020

The following is my personalised Linux workstation setup script that I run after a fresh installation of Linux Mint 19.3:

#!/bin/bash

##########
# Output #
##########

printf '[Workstation setup]: Started.\n'

####################
# Bash strict mode #
####################

printf '[Workstation setup]: Entering Bash strict mode.\n'

set -euo pipefail

IFS=$'\n\t'

############################
# Determine user for setup #
############################

if [ $EUID == 0 ]
then
	printf '[Workstation setup]: User is root.\n'

	####################
	# Upgrade packages #
	####################

	printf '[Workstation setup]: Repository update and upgrade.\n'

	apt update

	apt upgrade

	###########################
	# Install from repository #
	###########################

	printf '[Workstation setup]: Software installation.\n'

	apt install cutils
	apt install g++ g++-multilib gcc gcc-multilib gdb
	apt install glade
	apt install mono-complete
	apt install msttcorefonts
	apt install powerline

	#######################
	# Package | Powerline #
	#######################

	printf '[Workstation setup]: Powerline configuration.\n'

	cat << EOT >> /etc/bash.bashrc

# Powerline

powerline-daemon -q
POWERLINE_BASH_CONTINUATION=1
POWERLINE_BASH_SELECT=1
. /usr/share/powerline/bindings/bash/powerline.sh
EOT

	################################
	# Package | Visual Studio Code #
	################################

	printf '[Workstation setup]: Visual Studio Code installation.\n'

	curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg

	install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/

	rm microsoft.gpg

	add-apt-repository 'deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main'

	apt install apt-transport-https

	apt update

	apt install code

	#####################
	# Package | Vivaldi #
	#####################

	printf '[Workstation setup]: Vivaldi installation.\n'

	wget -qO- https://repo.vivaldi.com/archive/linux_signing_key.pub | sudo apt-key add -

	add-apt-repository 'deb [arch=amd64] https://repo.vivaldi.com/archive/deb/ stable main'

	apt update

	apt install vivaldi-stable
else
	printf '[Workstation setup]: User is not root.\n'
fi

#############
# GSettings #
#############

printf '[Workstation setup]: GSettings.\n'

gsettings set org.nemo.preferences show-hidden-files true

##########
# Output #
##########

printf '[Workstation setup]: Completed.\n'