- leer ">> Ingrese la ruta de instalaciĆ³n" "$CURRDIR/grupoNN" userpath
- if [ -n "$userpath" ]; then ROOTPATH=$userpath
- else ROOTPATH="$CURRDIR/grupoNN"
- fi
+ is_writeable=0
+ while [ $is_writeable -eq 0 ]; do
+ leer ">> Ingrese la ruta de instalaciĆ³n" "$CURRDIR/grupoNN" userpath
+ if [ -n "$userpath" ]; then
+ ROOTPATH=$userpath
+ if [ -w "${userpath%/*}" ]; then is_writeable=1
+ else echo ">> ERROR: No es posible crear dicho directorio"
+ fi
+ else
+ ROOTPATH="$CURRDIR/grupoNN"
+ is_writible=1
+ fi
+ done