diff options
author | phk <phk@FreeBSD.org> | 2010-11-23 21:21:56 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2010-11-23 21:21:56 +0000 |
commit | d30712dbd58663a988720844d570af8def318842 (patch) | |
tree | e63af78af521084023c20e37180f896129e2ccaa | |
parent | 7a1d0959ae6435b4a3b4a9a5908a794544b90765 (diff) | |
download | FreeBSD-src-d30712dbd58663a988720844d570af8def318842.zip FreeBSD-src-d30712dbd58663a988720844d570af8def318842.tar.gz |
Don't checksum distfiles twice if they match the first time.
-rw-r--r-- | tools/tools/sysbuild/sysbuild.sh | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/tools/tools/sysbuild/sysbuild.sh b/tools/tools/sysbuild/sysbuild.sh index a59fe61..b269da1 100644 --- a/tools/tools/sysbuild/sysbuild.sh +++ b/tools/tools/sysbuild/sysbuild.sh @@ -253,26 +253,24 @@ ports_prefetch() ( # Now checksump/fetch them for p in `cat /tmp/_.plist` do - echo "Prefetching $p" >> /mnt/_.prefetch b=`echo $p | tr / _` ( cd $p if make checksum $PORTS_OPTS ; then - true - else - make distclean - make checksum $PORTS_OPTS || true + rm -f /mnt/_.prefetch.$b + echo "OK $p" >> /mnt/_.prefetch + exit 0 fi - ) > /mnt/_.prefetch.$b 2>&1 - ( - cd $p + make distclean + make checksum $PORTS_OPTS || true + if make checksum $PORTS_OPTS > /dev/null 2>&1 ; then rm -f /mnt/_.prefetch.$b echo "OK $p" >> /mnt/_.prefetch else echo "BAD $p" >> /mnt/_.prefetch fi - ) + ) > /mnt/_.prefetch.$b 2>&1 done ) ) |