#!/usr/bin/env bash # # SCRIPT NAME: # etc.sh # # AUTHOR: # Severin Kaderli # # DESCRIPTION: # Copies files to /etc declare -A CONFIG_ETC_FILES CONFIG_ETC_FILES=( ["/etc/default/tlp"]="644" ["/etc/docker/daemon.json"]="644" ["/etc/gemrc"]="644" ["/etc/logrotate.d/custom.conf"]="644" ["/etc/mkinitcpio.conf"]="644" ["/etc/NetworkManager/conf.d/dns.conf"]="644" ["/etc/pacman.conf"]="644" ["/etc/resolv.conf"]="644" ["/etc/sudoers.d/severin"]="0440" ["/etc/vconsole.conf"]="644" ["/etc/zsh/zshenv"]="644" ["/etc/systemd/user.conf.d/00-limits.conf"]="644" ["/etc/systemd/system.conf.d/00-limits.conf"]="644" ["/etc/locale.gen"]="755" ["/etc/locale.conf"]="655" ["/etc/logid.cfg"]="655" ["/etc/sysctl.d/99-sysctl.conf"]="644" ["/etc/bluetooth/main.conf"]="644" ["/etc/modprobe.d/hid_apple.conf"]="644" ["/etc/xdg/reflector/reflector.conf"]="644" ) output::section "Copying /etc files" for file in "${!CONFIG_ETC_FILES[@]}"; do output::log "Copying ${YELLOW}${file}${DEFAULT}" sudo install -Dm "${CONFIG_ETC_FILES[${file}]}" "${SYSTEM_DIR}${file}" "${file}" |& output::debug done output::success "Successfully copied /etc files"