#!/bin/bash #################################### # # # to be run as root ... # # or executed step by step as root # # # #################################### set -e ################ # # # import keys: # # # ################ tmpFile="$(mktemp)" curl -o "${tmpFile}" "https://arch.eckner.net/masterkeys.gpg" pacman-key --add "${tmpFile}" rm -f "${tmpFile}" ############################ # # # locally sign package-key # # # ############################ pacman-key --lsign-key 5FDCA472AB93292BC678FD59255A76DB9A12601A ############################### # # # locally sign repository-key # # # ############################### pacman-key --lsign-key F8028D351891AE15970A2B3B3CFB0AD8F60030F8 ################################### # # # setup repository in pacman.conf # # # ################################### if ! grep -q "^\[archlinuxewe\]\$" /etc/pacman.conf then tmpFile="$(mktemp)" cat /etc/pacman.conf | \ ( while read s do if [[ "$s" = "# The testing repositories"* ]] then echo '[archlinuxewe]' echo 'SigLevel = Required' echo 'Server = https://arch.eckner.net/os/$arch' echo '' fi echo "${s}" done ) > "${tmpFile}" cat "${tmpFile}" > /etc/pacman.conf rm -f "${tmpFile}" fi