#!/usr/bin/env bash set -euo pipefail # function to keep sudo from timing out function func_dont_timeout { while true; do sudo -v sleep 60 done } # check if user is root if [ "$EUID" -ne 0 ]; then sudo -v fi # keep sudo active in background func_dont_timeout & cat </dev/null # check if the install scripts are the same # NOTE Arguments get passed automatically now if ! cmp --silent "$scriptloc" "$HOME/scripts/arch-config.sh"; then echo Removed old config file and launched new one. cp "$tempdir/arch-config/scripts/arch-config.sh" "$HOME/scripts/" && bash ~/scripts/arch-config.sh "$@" fi cat <