#!/bin/sh usertest() { if test "$(id -u)" -eq 0; then echo "You cannot run this script as root."; exit 1; fi if ! (getent passwd junikim 2>&1) > /dev/null; then echo "User junikim must exist."; exit 1 fi if ! (apk list | grep 'doas'); then echo "doas is not installed."; exit 1 fi } usertest echo "setting up xorg and xfce desktop environment" doas setup-xorg-base apk add xfce4 xfce4-terminal dbus echo "exec startxfce4" >> "$HOME/.xinitrc"