Fri Mar 6 13:05:21 2009 UTC ()
fix previous:
actually, if our /bin/sh has some bug related to set -e,
it's better to write the test with if-then-fi instead.


(tnn)
diff -r1.4 -r1.5 pkgsrc/pkgtools/pbulk/files/pbulk/scripts/pkg-up-to-date

cvs diff -r1.4 -r1.5 pkgsrc/pkgtools/pbulk/files/pbulk/scripts/pkg-up-to-date (expand / switch to unified diff)

--- pkgsrc/pkgtools/pbulk/files/pbulk/scripts/pkg-up-to-date 2009/03/06 13:00:29 1.4
+++ pkgsrc/pkgtools/pbulk/files/pbulk/scripts/pkg-up-to-date 2009/03/06 13:05:21 1.5
@@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
1#!@SH@ 1#!@SH@
2# $NetBSD: pkg-up-to-date,v 1.4 2009/03/06 13:00:29 tnn Exp $ 2# $NetBSD: pkg-up-to-date,v 1.5 2009/03/06 13:05:21 tnn Exp $
3# 3#
4# Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>. 4# Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>.
5# All rights reserved. 5# All rights reserved.
6# 6#
7# This code was developed as part of Google's Summer of Code 2007 program. 7# This code was developed as part of Google's Summer of Code 2007 program.
8# 8#
9# Redistribution and use in source and binary forms, with or without 9# Redistribution and use in source and binary forms, with or without
10# modification, are permitted provided that the following conditions 10# modification, are permitted provided that the following conditions
11# are met: 11# are met:
12# 12#
13# 1. Redistributions of source code must retain the above copyright 13# 1. Redistributions of source code must retain the above copyright
14# notice, this list of conditions and the following disclaimer. 14# notice, this list of conditions and the following disclaimer.
15# 2. Redistributions in binary form must reproduce the above copyright 15# 2. Redistributions in binary form must reproduce the above copyright
@@ -56,15 +56,17 @@ done @@ -56,15 +56,17 @@ done
56shift 56shift
57 57
58${pkg_info} -qN ${pkg} | while read dep; do 58${pkg_info} -qN ${pkg} | while read dep; do
59 # pkg_info prints a trailing newline, ignore that 59 # pkg_info prints a trailing newline, ignore that
60 [ -z "${dep}" ] && continue 60 [ -z "${dep}" ] && continue
61 found=0 61 found=0
62 for dep2 in $*; do 62 for dep2 in $*; do
63 if [ $dep = $dep2 ]; then 63 if [ $dep = $dep2 ]; then
64 found=1 64 found=1
65 break 65 break
66 fi 66 fi
67 done 67 done
68 [ $found = 1 ] 68 [ $found = 1 ]
69 [ "${packages}/All/${dep}.tgz" -ot "${pkg}" ] 69 if [ "${packages}/All/${dep}.tgz" -nt "${pkg}" ]; then
 70 exit 1
 71 fi
70done 72done