@@ -355,8 +355,11 @@ sys_enable_guix_daemon()
sys_authorize_build_farms()
{ # authorize the public keys of the two build farms
+ local yn=$AUTO_YN
+
while true; do
- read -p "Permit downloading pre-built package binaries from the project's build farms? (yes/no) " yn
+ [[ -n $yn ]] || read -p "Permit downloading pre-built package binaries from the project's build farms? (yes/no) " yn
+
case $yn in
[Yy]*) guix archive --authorize < "${ROOT_HOME}/.guix-profile/share/guix/hydra.gnu.org.pub" &&
_msg "${PAS}Authorized public key for hydra.gnu.org";
@@ -365,7 +368,7 @@ sys_authorize_build_farms()
break;;
[Nn]*) _msg "${INF}Skipped authorizing build farm public keys"
break;;
- *) _msg "Please answer yes or no.";
+ *) _msg "Please answer yes or no."; yn=""
esac
done
}