#/bin/sh USER= PASS= URL_REPO="https://devel.gvsig.org/download/projects/Raster/pool/" FILE_TICKET=/tmp/ticket.txt rm $FILE_TICKET 2> /dev/null for dir in `ls` do if [ ! -d $dir ]; then continue; fi cd $dir for file in `ls *.gvspki` do echo $URL_REPO$dir/$file >> $FILE_TICKET echo "" >> $FILE_TICKET done cd .. done for dir in `ls` do if [ ! -d $dir ]; then continue; fi expect < send "cd $dir\r" expect $dir/> send "lcd $dir\r" expect $PKG_DIR/> send "mput *.gvspki\r" expect "Nombre de usuario:" send $USER\r expect "ContraseƱa:" send $PASS\r expect $PKG_DIR/> send "mput *.gvspkg\r" expect $PKG_DIR/> send quit\r expect "cerrada." EOD done