2019-05-06 02:04:19 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# File: shadowarch-sync
|
|
|
|
#
|
|
|
|
# Description: This file syncs the ShadowArch customization files over the ones created by other packages, like filesystem and pacman
|
|
|
|
#
|
|
|
|
# Package: AniNIX::Foundation/ShadowArch
|
|
|
|
# Copyright: WTFPL
|
|
|
|
#
|
|
|
|
# Author: DarkFeather <darkfeather@aninix.net>
|
|
|
|
|
2019-05-17 17:53:31 -05:00
|
|
|
seconds=10
|
|
|
|
echo "This will sync your /etc files with the AniNIX defaults and add the AniNIX
|
|
|
|
GPG key for pacman."
|
|
|
|
echo "Proceeding in $seconds seconds. Is this OK? [YES/no] "
|
|
|
|
timeout $seconds cat | read answer
|
|
|
|
if [[ "${answer,,}" =~ ^n ]]; then
|
|
|
|
exit 0;
|
|
|
|
fi
|
|
|
|
|
2019-05-06 02:04:19 -05:00
|
|
|
rsync -avz /opt/aninix/ShadowArch/etc/ /etc/
|
2019-05-17 17:53:31 -05:00
|
|
|
keyid=D9DC5933A1B0D4F7
|
|
|
|
if ! gpg --homedir /etc/pacman.d/gnupg --list-key "${keyid}"; then
|
|
|
|
pacman-key --add /usr/share/pacman/keyrings/aninix.gpg
|
|
|
|
pacman-key --finger "${keyid}"
|
|
|
|
pacman-key --lsign-key "${keyid}"
|
|
|
|
fi
|