aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2022-10-16 02:00:00 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2022-10-16 02:00:28 +0200
commita326e3085da451c82ea461116ea1f59318f0f81d (patch)
treef3fea54aeab4e0e87f9f865a6f5b96673d0cfee8
parent1e8e84b286acf147196ac95a515564324a0a9ae9 (diff)
downloadguix-a326e3085da451c82ea461116ea1f59318f0f81d.tar
guix-a326e3085da451c82ea461116ea1f59318f0f81d.tar.gz
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.
-rwxr-xr-xetc/guix-install.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 43dea3b605..152accef77 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -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()