mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-10-01 01:36:12 -04:00
Improve the yes/no prompt in install.sh (#683)
* Improve the yes/no prompt in install.sh The old implementation used a feature only present on Bash version 4, which not all systems have. The new version should work on all bash shells. * Update install.sh
This commit is contained in:
parent
d5f62e1355
commit
8d4ab4555c
8
install.sh
vendored
8
install.sh
vendored
@ -16,10 +16,10 @@ init_db_final=0
|
|||||||
while [ "$init_db_valid" == 0 ]
|
while [ "$init_db_valid" == 0 ]
|
||||||
do
|
do
|
||||||
read -p "Initialize database (y/n)? " init_db
|
read -p "Initialize database (y/n)? " init_db
|
||||||
case "${init_db,,}" in
|
case "$init_db" in
|
||||||
y|yes ) init_db_valid=1; init_db_final=1;;
|
[yY]* ) init_db_valid=1; init_db_final=1;;
|
||||||
n|no ) init_db_valid=1; init_db_final=0;;
|
[nN]* ) init_db_valid=1; init_db_final=0;;
|
||||||
* ) echo "Invalid input" 1>&2;;
|
* ) echo "Invalid input. Please enter either \"y\" or \"n\"." 1>&2;;
|
||||||
esac
|
esac
|
||||||
echo
|
echo
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user