John,

Thanks so much for helping, that really worked!
Now I have a stranger problem:

I developed this script on a RH 6.2 server and it works fine, but when O move it to 
another RH 6.2 server and try to run it, I get the following error:

[root@csc003 SrcRpms]# ~/Scripts/srpm_arch_tester.sh glibc-2.1.3-22.src.rpm 
/root/Scripts/srpm_arch_tester.sh: [: too many arguments
Terminated

I have the same version of bash on both boxes:

[root@garnet Script]# rpm -q bash
bash-1.14.7-23.6x

[root@csc003 SrcRpms]# rpm -q bash
bash-1.14.7-23.6x

The only thing I can think of is, I know I compiled bash for i686 on the non-working 
box, and I think it's only i386 on the working box. I really don't see what it's 
complaining about though. The script is as follows:


#!/bin/bash
#srpm_arch_tester.sh

trap 'kill 0' 0 1 2 3

if [ -z $1 ]
then
    echo
    echo
    echo "This script attempts to compile a given src.rpm for all standard 
architectures,"
    echo "logs the results, and states success or failure for each attempt."
    echo
    echo "Usage: srpm_arch_tester.sh <the.src.rpm_name>"
    echo
    echo
    exit
fi
if  [ $1 != *.src.rpm ] && [ $1 != *.srpm ]
then
    clear
    echo
    echo
    echo "Hey, that's not a source rpm!"
    echo
    exit
fi

rpm --rebuild --target=i386 *.src.rpm >i386.log 2>&1 && echo "i386 works" || echo 
"i386 failed"
rpm --rebuild --target=i486 *.src.rpm >i486.log 2>&1 && echo "i486 works" || echo 
"i486 failed"
rpm --rebuild --target=i586 *.src.rpm >i586.log 2>&1 && echo "i586 works" || echo 
"i586 failed"
rpm --rebuild --target=i686 *.src.rpm >i686.log 2>&1 && echo "i686 works" || echo 
"i686 failed"
rpm --rebuild --target=athlon *.src.rpm >athlon.log 2>&1 && echo "athlon works" || 
echo "athlon failed"
echo
echo "test done"
#end script


It works perfectly on the box I wrote it on. Any idea what it's complaining about?

TIA:-)

At 09:42 PM 2/14/2001 -0800, you wrote:


----------------------------------------------------
Jonathan Wilson
System Administrator

Cedar Creek Software
http://www.cedarcreeksoftware.com

Central Texas IT
http://www.centraltexasit.com



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to