Author: jfrederic.clere(a)jboss.com
Date: 2008-02-01 06:35:33 -0500 (Fri, 01 Feb 2008)
New Revision: 1324
Modified:
trunk/build/unix/util/buildrhelsrc.sh
Log:
Some more cleaning.
Modified: trunk/build/unix/util/buildrhelsrc.sh
===================================================================
--- trunk/build/unix/util/buildrhelsrc.sh 2008-02-01 11:23:53 UTC (rev 1323)
+++ trunk/build/unix/util/buildrhelsrc.sh 2008-02-01 11:35:33 UTC (rev 1324)
@@ -83,24 +83,26 @@
fname=`cat ${rhel_loc}/sources | awk '{ print $2 }'`
dir=`cat ${rhel_loc}/sources | awk '{ print $1 }'`
sum="NONE"
-if [ -f ${fname} ]; then
- sum=`openssl md5 ${fname} | awk ' { print $2 } '`
+if [ -f ${build_cache_dir}/${fname} ]; then
+ sum=`openssl md5 ${build_cache_dir}/${fname} | awk ' { print $2 } '`
if [ "x${sum}" = "x" ];then
- sum=`md5sum ${fname} | awk ' { print $1 } '`
+ sum=`md5sum ${build_cache_dir}/${fname} | awk ' { print $1 } '`
fi
fi
if [ ${dir} = ${sum} ]; then
- echo "$fname already available"
+ echo "${build_cache_dir}/$fname already available"
else
+ rm -f ${build_cache_dir}/$fname
rm -f $fname
wget --tries=0 --retry-connrefused ${URL}/${fname}/${dir}/${fname}
if [ $? -ne 0 ];then
echo "wget $fname failed"
exit 1
fi
+ mv $fname ${build_cache_dir}
fi
-gunzip -c ${fname} | tar -xf -
-dirsources=`gunzip -c ${fname} | tar -tf - | head -1 | awk '{ print $1 }'`
+gunzip -c ${build_cache_dir}/${fname} | tar -xf -
+dirsources=`gunzip -c ${build_cache_dir}/${fname} | tar -tf - | head -1 | awk '{
print $1 }'`
mv ${dirsources} ${destdir}/srclib
dirsources=${destdir}/srclib/${dirsources}
Show replies by date