Skip to content
Snippets Groups Projects
Commit b9b056ce authored by Robert Martin-Legene's avatar Robert Martin-Legene
Browse files

Mas tiempo para contestar, y defaults si nos tenes tty

parent cb20707a
No related branches found
No related tags found
No related merge requests found
......@@ -192,7 +192,10 @@ function welcome
function setupquestions
{
read -p "Donde quiere instalar (sera BFAHOME) [$( echo ~bfa/bfa )]? : " -t 60 BFAHOME
if [ -t 0 ]
then
read -p "Donde quiere instalar (sera BFAHOME) [$( echo ~bfa/bfa )]? : " -t 300 BFAHOME
fi
if [ "$BFAHOME" = "" ]
then
BFAHOME=$( echo ~bfa/bfa )
......@@ -201,27 +204,24 @@ function setupquestions
if [ ! -e "${BFAHOME}/bin/env" ]
then
REPLY=
while [ "$REPLY" != "1" -a "$REPLY" != "2" ]
do
echo "Quiere conectarse a la red BFA de produccion o prueba?"
echo "1. Produccion"
echo "2. Prueba (test2)"
read -p "Red: " -t 60 -n 1
done
# Default to production
if [ "$REPLY" = "" ]
if [ -t 0 ]
then
REPLY=1
while [ "$REPLY" != "1" -a "$REPLY" != "2" ]
do
echo "Quiere conectarse a la red BFA de produccion o prueba?"
echo "1. Produccion"
echo "2. Prueba (test2)"
read -p "Red: " -t 60 -n 1
echo
done
fi
case "$REPLY" in
1)
envfile=network/env
;;
2)
envfile=test2network/env
;;
*)
false
# Default to production
envfile=network/env
;;
esac
fi
......
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment