Created
October 8, 2014 19:13
-
-
Save jmoren/fc9fb880855f78a21324 to your computer and use it in GitHub Desktop.
Esta funcion es la que lee el archivo de configuracion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| function checkConfig { | |
| echo -e " * Chequeanado archivos de configuracion..." | |
| if [ ! -f $CONFIGFILE ]; then | |
| echo -e "\t> `basename $CONFIGFILE`\t \033[0;31mNO\033[m" | |
| echo -e " * Debe ejecutar el script de instalacion para reparar la instalacion\n" | |
| exit -1 | |
| else | |
| echo -e "\t> `basename $CONFIGFILE`\t \033[0;32mSI\033[m" | |
| echo " " | |
| for line in `cat "$CONFIGFILE"`; do | |
| export $line | |
| done | |
| fi | |
| } | |
| .... |
Author
lo que tenés que hacer es:
set -a
source $CONFIGFILE
set +ay *borrar las líneas 11 a 13.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ese for, que lee linea por linea, lo puse asi, porque guarde en el archivo de conf:
VARIABLE=valor
VARIABLE2=valor
Probe tambien poner:
export VARIABLE=valor
export VARIABLE2=valor
y hacer directamente source $CONFIGFILE