arch-maride-flavour/checks/packeys.check
2017-11-02 13:05:34 +01:00

23 lines
647 B
Bash
Executable File

#!/bin/bash
amf_return=0
dirmngr &
echo " We can force to fetch PGP keys via HTTP over 80/tcp."
echo " You probably don't want this unless your internet connection is heavily filtered."
echo -n "=> Is your internet connection filtered (e.g. company network)? (y/N)"
read answer
if [ "$answer" == "y" ] || [ "$answer" == "Y" ]; then
echo " Ugh. Poor bastard, you."
keyserver="hpk://p80.pool.sks-keyservers.net:80"
else
keyserver="hkp://pool.sks-keyservers.net"
fi
echo " Fetching via $keyserver"
pacman-key --populate --keyserver $keyserver || amf_return=1
pacman-key --refresh-keys --keyserver $keyserver || amf_return=1