-N is an illegal option for read in sh.
This commit is contained in:
Nyr 2020-07-18 18:47:49 +02:00
parent 03cf6ddf2e
commit 3fb598f794

View File

@ -5,15 +5,15 @@
# Copyright (c) 2020 Nyr. Released under the MIT License.
# Discard stdin. Needed when running from an one-liner which includes a newline
read -N 999999 -t 0.001
# Detect Debian users running the script with "sh" instead of bash
if readlink /proc/$$/exe | grep -q "dash"; then
echo 'This installer needs to be run with "bash", not "sh".'
exit
fi
# Discard stdin. Needed when running from an one-liner which includes a newline
read -N 999999 -t 0.001
# Detect OpenVZ 6
if [[ $(uname -r | cut -d "." -f 1) -eq 2 ]]; then
echo "The system is running an old kernel, which is incompatible with this installer."