installation scripts for servers.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

138 lines
4.0 KiB

DIR="$(realpath "$(dirname "$0")")"
# script must start at home directory
cd "$HOME" || exit 1;
usertest() {
if test "$(id -u)" -eq 0; then
echo "You cannot run this script as root.";
exit 1;
if ! (type sudo 2>&1) > /dev/null; then
echo "sudo is not installed.";
exit 1
sudo apt install -y make curl
echo "Updating APT and adding PPA's"
curl -sL | sudo -E bash -
sudo apt update -y || exit 1
sudo apt upgrade -y || exit 1
dev() {
echo "Developer tools..."
# install neovim through appimage (no snaps)
sudo curl -LJo "/usr/local/bin/nvim"
sudo chmod +x "/usr/local/bin/nvim"
# install nodejs (coc in neovim)
sudo apt-get update -y && sudo apt-get install -y nodejs
sysinfo() {
echo "Dylan Araps scripts"
cd "$HOME" || exit 1;
mkdir -p repos
git clone "$HOME/repos/pfetch"
git clone "$HOME/repos/neofetch"
git clone "$HOME/repos/fff"
cd "$HOME/repos/pfetch" || exit 1;
sudo make install || exit 2;
cd "$HOME" || exit 1;
cd "$HOME/repos/neofetch" || exit 1;
sudo make install || exit 2;
cd "$HOME" || exit 1;
cd "$HOME/repos/fff" || exit 1;
sudo make install || exit 2;
cd "$HOME" || exit 1;
shell() {
sudo apt install -y zsh
curl -sS | sh
browsers() {
sudo apt remove -y firefox
sudo snap remove firefox
# install brave
sudo apt install apt-transport-https -y
sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] stable main"|sudo tee /etc/apt/sources.list.d/brave-browser-release.list
sudo apt update -y
sudo apt install brave-browser -y
torbrowser() {
sudo apt install -y torbrowser-launcher
popshell() {
mkdir -p "$HOME/repos"
sudo apt install git node-typescript make -y
git clone "$HOME/repos/shell"
meetings() {
mkdir -p "$HOME/repos"
# install skype
curl -LJo "$HOME/repos/skypeforlinux.deb"
sudo apt install "$HOME/repos/skypeforlinux.deb" -y
# install zoom
curl -LJo "$HOME/repos/zoomus.deb"
sudo apt install "$HOME/repos/zoomus.deb" -y
# install mt
sudo curl -LJ -o /usr/local/bin/mt
sudo chmod +x /usr/local/bin/mt
# neovim must be installed.
plugins() {
# install vim-plug, oh-my-zsh, and zsh-syntax-highlighting
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \'
sh -c "$(curl -fsSL"
git clone "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting"
dotfiles() {
echo "Adding vim and zsh configs"
if ! test -d "$DIR/dotfiles"; then
echo "$DIR/dotfiles folder not found.";
exit 1;
mkdir -p "$HOME/.config/nvim"
cp "$DIR/dotfiles/.zshrc" "$HOME/.zshrc"
cp "$DIR/dotfiles/init.vim" "$HOME/.config/nvim/init.vim"
nvim --headless +PlugInstall +qa
competitiveprogramming() {
echo "CP Compilers..."
sudo apt install clang clang-tools-extra
cd "$HOME" || exit 1;
git clone "$HOME/cp"
(usertest && dev && sysinfo && shell && browsers && torbrowser && meetings && plugins && dotfiles) || exit 1
(popshell) || exit 1
cat <<EOF
Stuff to do:
- Install pop-shell (make local-install)
- Install the coc extensions
- Settle brave key stuff
- Copy over the mt config files