Skip to content

Commit

Permalink
Use select bash construct instead. (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xn3bs committed Jan 24, 2021
1 parent fdbd1b1 commit 37aa580
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions install.sh
Expand Up @@ -55,13 +55,13 @@ if [ -d "/run/systemd/system/" ]
then
if ! service_exists cypnode; then
echo "cypnode.service not detected"

read -p "Would you like to install cynode as a service?"

while true; do
read -p "Would you like to install cynode as a service?" yn
select yn in "Yes" "No"; do
case $yn in
[Yy]* ) curl -s https://raw.githubusercontent.com/cypher-network/cypher/$version/create-service.sh | bash; break;;
[Nn]* ) break;;
* ) echo "Please answer yes or no.";;
Yes ) curl -s https://raw.githubusercontent.com/cypher-network/cypher/$version/create-service.sh | bash; break;;
No ) break;;
esac
done
else
Expand Down

0 comments on commit 37aa580

Please sign in to comment.