#!/bin/sh for i in \ perl_mod1 \ perl_mod2 \ perl_mod3 do echo "do $i ?" read doit if [ $doit = 'y' ] then rm -rf $i tar -xvf ${i}.tar cd $i perl Makefile.PL echo "perl makefile.pl okay?" read key make echo "make okay?" read key make test echo "make test okay?" read key # su root -c "/usr/local/bin/make install" expect -c 'spawn su root -c "/usr/local/bin/make install" send -- "rootspasswd\r" ' echo "make install okay?" read key cd .. else echo "okay f it" fi done