Skip to content

Instantly share code, notes, and snippets.

@jmoren
Created October 8, 2014 19:13
Show Gist options
  • Select an option

  • Save jmoren/fc9fb880855f78a21324 to your computer and use it in GitHub Desktop.

Select an option

Save jmoren/fc9fb880855f78a21324 to your computer and use it in GitHub Desktop.
Esta funcion es la que lee el archivo de configuracion
...
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
}
....
@jmoren
Copy link
Copy Markdown
Author

jmoren commented Oct 8, 2014

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

@iramello
Copy link
Copy Markdown

iramello commented Oct 8, 2014

lo que tenés que hacer es:

set -a
source $CONFIGFILE
set +a

y *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