guix-install.sh: Warn if we suspect dodgy automation.

This doesn't affect the installation (yet), but reserves the right to
default to safe values other than ‘y’ in future.

* etc/guix-install.sh (welcome): Warn if the ‘return’ wasn't.
This commit is contained in:
Tobias Geerinckx-Rice 2022-10-16 02:00:00 +02:00
parent 1e8e84b286
commit a326e3085d
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -581,6 +581,7 @@ fi
welcome()
{
local char
cat<<"EOF"
░░░ ░░░
░░▒▒░░░░░░░░░ ░░░░░░░░░▒▒░░
@ -607,7 +608,13 @@ This script installs GNU Guix on your system
https://www.gnu.org/software/guix/
EOF
echo -n "Press return to continue..."
read -r
read -r char
if [ "$char" ]; then
echo
echo "...that ($char) was not a return!"
_msg "${WAR}Use newlines to automate installation, e.g.: yes '' | ${0##*/}"
_msg "${WAR}Any other method is unsupported and likely to break in future."
fi
}
main()