Improvements to install.sh ?

Denis Beauchemin Denis.Beauchemin at USherbrooke.ca
Mon Sep 29 13:49:33 IST 2008


Julian Field a écrit :
>
>
> Scott Silva wrote:
>> on 9-28-2008 9:44 AM Julian Field spake the following:
>>> Good idea, I like that one. There is now a "reinstall" or 
>>> "--reinstall" command-line option which will attempt to remove the 
>>> perl-<module-name> rpm if it is installed, just before it attempts 
>>> to install the new one.
>>> Should solve your problem nicely.
>>>
>>> I have also added a logfile called "install.log" in the current 
>>> directory, in which all output will be copied.
>>>
>> Is there any possibility of adding a pause after the removal phase 
>> but before the re-install phase?
> It's done per-module. I'm not sure I can rewind a <<EOF document, so I 
> can't read the table twice. I'm trying to avoid duplicating stuff in 
> the file if I can.
>
> Jules
>
Julian,

I just tried the following and it seems to work fine:
#!/bin/bash

LIST="/etc/motd
/etc/sysconfig/network
/etc/hosts
/etc/group"

while read FILE
do
    echo "Working on $FILE"
done << EOF
$LIST
EOF

while read FILE
do
    ls -l "$FILE"
done << EOF
$LIST
EOF

Denis

-- 
   _
  °v°   Denis Beauchemin, analyste
 /(_)\  Université de Sherbrooke, S.T.I.
  ^ ^   T: 819.821.8000x62252 F: 819.821.8045




More information about the MailScanner mailing list