]> git.llucax.com Git - z.facultad/75.08/llamadas.git/commitdiff
epa epa, ya se crean los directorios y se agrega la informacion al afinstal.conf...
authorNicolás Dimov <ndimov@gmail.com>
Mon, 4 Oct 2004 17:00:41 +0000 (17:00 +0000)
committerNicolás Dimov <ndimov@gmail.com>
Mon, 4 Oct 2004 17:00:41 +0000 (17:00 +0000)
AFINSTAL

index 9c8eb9655c5b3a3ff0788c490a1931318b5176b0..926036226932e344271e2816ca6a54e10f5226ba 100755 (executable)
--- a/AFINSTAL
+++ b/AFINSTAL
@@ -1,5 +1,5 @@
 #!/bin/bash 
-# vim: set softtabstop=4 tabstop=4 smarttab shiftwidth=4
+# vim: set softtabstop=4 tabstop=4 
 # variables de entorno
 #echo "editor "$EDITOR
 #echo "env "$ENV
@@ -165,7 +165,7 @@ if [ -d "$PATH_GENERAL" ]; then
        echo "El directorio ya existe."
        echo "Seleccione una opcion R: reinstalar, A: actualizar, C: Cancelar "
        read sel
-       while [ "$sel" != "R" || "$sel" != "A" ]; do
+       while [ "$sel" != "R" ]; do # || "$sel" != "A" ]; do
                if [ "$sel" == "C" ]; then 
                        echo "Proceso de Instalación Cancelado"
                        exit 0
@@ -182,10 +182,57 @@ if [ -d "$PATH_GENERAL" ]; then
                mkdir $BINDIR
                mkdir $DATADIR
                mkdir $LOGDIR
+               mkdir "$DATADIR/aprocesar"
+               mkdir "$DATADIR/enproceso"
+               mkdir "$DATADIR/rechazadas"
+               mkdir "$DATADIR/procesadas"
                #creo archivos de log
                cat /dev/null > "$LOGDIR/$LOGNAME"
-               cat /dev/null > "$CONFDIR/afinstal.conf"
-#              sed a "INSTDIR = $INSTDIR" "$CONFDIR/afinstal.conf"
-#              sed a "CONFDIR = $CONFDIR" "$CONFDIR/afinstal.conf"
+               #inserto informacion de instalacion
+               echo "INSTDIR = $INSTDIR" >> "$CONFDIR/afinstal.conf"
+               echo "CONFDIR = $CONFDIR" >> "$CONFDIR/afinstal.conf"
+               for n in `seq 3 51`
+               do
+                       echo "" >> "$CONFDIR/afinstal.conf"
+               done            
+               linea=10
+               i=0
+               fecha=$(date)
+               for FILE in ANTIFRAUDE.PL AFICONF AFIMONIO
+               do
+                       numlinea=`expr $linea + $i`
+                       cat "$CONFDIR/afinstal.conf" | sed "$numlinea""s/.*/Comando $FILE/" > "$CONFDIR/afinstal.conf"
+                       i=`expr $i + 1`
+                       numlinea=`expr $linea + $i`
+                       cat "$CONFDIR/afinstal.conf" | sed "$numlinea""s(.*(BINDIR = $BINDIR(" > "$CONFDIR/afinstal.conf"
+                       i=`expr $i + 1`
+                       numlinea=`expr $linea + $i`
+                       cat "$CONFDIR/afinstal.conf" | sed "$numlinea""s(.*(LOGDIR = $LOGDIR(" > "$CONFDIR/afinstal.conf"
+                       i=`expr $i + 1`
+                       numlinea=`expr $linea + $i`
+                       cat "$CONFDIR/afinstal.conf" | sed "$numlinea""s(.*(LOGNAME = $LOGNAME(" > "$CONFDIR/afinstal.conf"
+                       i=`expr $i + 1`
+                       numlinea=`expr $linea + $i`
+                       cat "$CONFDIR/afinstal.conf" | sed "$numlinea""s(.*(LOGSIZE = $LOGSIZE(" > "$CONFDIR/afinstal.conf"
+                       if [ "$FILE" == "ANTIFRAUDE.PL" ]; then
+                               i=`expr $i + 1`
+                               numlinea=`expr $linea + $i`
+                               cat "$CONFDIR/afinstal.conf" | sed "$numlinea""s(.*(DATADIR = $DATADIR(" > "$CONFDIR/afinstal.conf"
+                               i=`expr $i + 1`
+                               numlinea=`expr $linea + $i`
+                               cat "$CONFDIR/afinstal.conf" | sed "$numlinea""s(.*(DATASIZE = (" > "$CONFDIR/afinstal.conf"
+                       fi              
+                       i=`expr $i + 1`
+                       numlinea=`expr $linea + $i`
+                       cat "$CONFDIR/afinstal.conf" | sed "$numlinea""s(.*(USERID = $USER(" > "$CONFDIR/afinstal.conf"
+                       i=`expr $i + 1`
+                       numlinea=`expr $linea + $i`
+                       cat "$CONFDIR/afinstal.conf" | sed "$numlinea""s(.*(FECINS = $fecha(" > "$CONFDIR/afinstal.conf"
+
+                       i=0
+                       linea=`expr $linea + 10`
+               done
+                                               
+               
        fi      
 fi