#!/usr/bin/env bash # This script will add scripts-* to the PATH and the manual to each user's Desktop # Copyright 2021 Bryan C. Roessler [[ -f functions ]] && . functions || exit 1 is_root install -m 644 functions /usr/local/bin/ for script in script-*; do install -m755 "$script" /usr/local/bin/ done # Install manual manual="README.html" [[ ! -f "$manual" ]] && echo "No manual found, skipping!" && exit 1 for homedir in /home/*; do remove=("manual.pdf" "manual.odt" "Notes.pdf" "Notes.odt" "README.html") for f in "${remove[@]}"; do [[ -f "${homedir}/Desktop/$f" ]] && echo "Removing ${homedir}/Desktop/$f" && rm -f "${homedir}/Desktop/$f" done ln -s "$manual" "${homedir}/Desktop/$manual" done