diff options
author | Hans-Joachim Lankenau <hjs@openoffice.org> | 2010-03-10 16:11:08 +0100 |
---|---|---|
committer | Hans-Joachim Lankenau <hjs@openoffice.org> | 2010-03-10 16:11:08 +0100 |
commit | f92271ee18b11a7bcd424f0583ae3f36954ffb7f (patch) | |
tree | 8c9938851b7be5ad40cb08d98f0182365949ee6f /fetch_tarballs.sh | |
parent | 5cfd0629661715fc16b8a74150e3011d14d2b389 (diff) |
ause110: #i106731# speedup
Diffstat (limited to 'fetch_tarballs.sh')
-rwxr-xr-x | fetch_tarballs.sh | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/fetch_tarballs.sh b/fetch_tarballs.sh index 8d21939ffb9e..d00f33559ddd 100755 --- a/fetch_tarballs.sh +++ b/fetch_tarballs.sh @@ -97,15 +97,16 @@ if [ -z "$md5sum" ]; then fi start_dir=`pwd` -for i in `cat $1` ; do +filelist=`cat $1` +cd $TARFILE_LOCATION +for i in $filelist ; do # echo $i if [ "$i" != `echo $i | sed "s/^http:\///"` ]; then tarurl=$i # TODO: check for comment else if [ "$tarurl" != "" ]; then - cd $TARFILE_LOCATION - if [ ! -f $i ]; then + if [ ! -e $i ]; then if [ ! -z $wget ]; then $wget -nv -N $tarurl/$i else @@ -117,19 +118,19 @@ for i in `cat $1` ; do failed="$failed $i" wret=0 fi - fi - if [ -f $i -a -n "$md5sum" ]; then - sum=`$md5sum $i | sed "s/ [ *].*//"` - sum2=`echo $i | sed "s/-.*//"` - if [ "$sum" != "$sum2" ]; then - echo checksum failure for $i - failed="$failed $i" + if [ -e $i -a -n "$md5sum" ]; then + sum=`$md5sum $i | sed "s/ [ *].*//"` + sum2=`echo $i | sed "s/-.*//"` + if [ "$sum" != "$sum2" ]; then + echo checksum failure for $i + failed="$failed $i" + fi fi fi - cd $start_dir fi fi done +cd $start_dir if [ ! -z "$failed" ]; then echo |