ogbrowser/vagrant/ogbrowser-sway/init.sh

42 lines
1010 B
Bash

#!/bin/bash
set -e
export DEBIAN_FRONTEND=noninteractive
export DEBIAN_PRIORITY=critical
export NEEDRESTART_MODE=a
BUILD_DEPENDENCIES="build-essential cmake g++ qt6-base-dev qt6-webengine-dev linguist-qt6 libgl1-mesa-dev qt6-tools-dev qt6-l10n-tools qt6-tools-dev-tools libqt6core5compat6-dev lxqt-build-tools qt6-webengine-dev-tools libqt6webenginecore6-bin"
## Initial setup
sudo apt update
sudo apt dist-upgrade -y
## Install dependencies and build
sudo apt install -y $BUILD_DEPENDENCIES
mkdir -p /tmp/build
cd /tmp/build
cmake /vagrant_data/
make -j2
sudo make install
## Ensure we have the requirements to run the browser
sudo apt install -y sway qt6-wayland kitty-terminfo ncdu libqt6core5compat6 libqt6webenginewidgets6 libqt6webenginecore6-bin
## Remove everything unneeded.
sudo apt -y remove $BUILD_DEPENDENCIES
sudo apt -y autoremove
sudo apt clean all
sudo journalctl --vacuum-size=16M
## Setup sway
mkdir -p $HOME/.config/sway
cp -v /vagrant/files/sway/config $HOME/.config/sway