diff options
Diffstat (limited to 'mk')
-rwxr-xr-x | mk/scripts/binpkg-cache | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mk/scripts/binpkg-cache b/mk/scripts/binpkg-cache index cfdb37f3a92..3388d74e745 100755 --- a/mk/scripts/binpkg-cache +++ b/mk/scripts/binpkg-cache @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: binpkg-cache,v 1.17 2007/10/13 17:46:12 rillig Exp $ +# $NetBSD: binpkg-cache,v 1.18 2010/02/27 12:00:54 spz Exp $ # # Script for generating a cache file with information about # all binary packages contained in a directory. @@ -206,7 +206,7 @@ process_binpkg_dir(){ need_update=yes fi if test "${build_summary}" = "yes" -a ${d}/${summaryfile}.gz -ot ${d}/${cachefile} ; then - echo "${tab}Summary file ${d}/${summaryfile}.gz is out of date and will be regnerated." + echo "${tab}Summary file ${d}/${summaryfile}.gz is out of date and will be regenerated." need_update=yes fi @@ -238,6 +238,9 @@ process_binpkg_dir(){ fi echo "pkgcache_end ${fn}" >> ${tmpd}/${cachefile} done + if test -f ${d}/${cachefile} ; then + rm -f ${d}/${cachefile} + fi mv -f ${tmpd}/${cachefile} ${d}/${cachefile} if test $? -ne 0 ; then echo "********** WARNING **********" @@ -249,6 +252,9 @@ process_binpkg_dir(){ fi if test "${build_summary}" = "yes" ; then + if test -f ${d}/${summaryfile}.gz ; then + rm -f ${d}/${summaryfile}.gz + fi cat ${tmpd}/${summaryfile} | ${GZIP_CMD} > ${d}/${summaryfile}.gz if test $? -ne 0 ; then echo "********** WARNING **********" |