summaryrefslogtreecommitdiff
path: root/scripts/gensync
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2005-11-28 19:47:51 +0000
committerJudd Vinet <judd@archlinux.org>2005-11-28 19:47:51 +0000
commit7f240a92215f4082ccf4ce3d1b1c966c60a5c396 (patch)
tree0899f61981e50c5252ca8698165823d4ef6f3fb8 /scripts/gensync
parentf7624646307a0d4451dbba573fc42ef338eb9417 (diff)
don't die on missing package files, just warn (#3535)
Diffstat (limited to 'scripts/gensync')
-rwxr-xr-xscripts/gensync16
1 files changed, 9 insertions, 7 deletions
diff --git a/scripts/gensync b/scripts/gensync
index 3cfcbcaa..cf399562 100755
--- a/scripts/gensync
+++ b/scripts/gensync
@@ -140,7 +140,7 @@ db_write_entry()
if [ $# -lt 2 ]; then
usage
- exit 0
+ exit 1
fi
if [ "$1" = "-h" -o "$1" = "--help" ]; then
@@ -169,12 +169,14 @@ for file in `find $rootdir/* -name PKGBUILD`; do
else
pkgfile="$destdir/$pkgname-$pkgver-$pkgrel.pkg.tar.gz"
fi
- [ -f $pkgfile ] || die "missing package file: $pkgfile"
- csize=`du -b $pkgfile | cut -f1`
- pkgmd5sum=`get_md5checksum $pkgfile`
- [ -z $pkgmd5sum ] && die "error generating checksum for $pkgfile"
- db_write_entry $file
- [ $? -gt 0 ] && die "error writing entry for $file"
+ if [ -f $pkgfile ]; then
+ csize=`du -b $pkgfile | cut -f1`
+ pkgmd5sum=`get_md5checksum $pkgfile`
+ [ -z $pkgmd5sum ] && die "error generating checksum for $pkgfile"
+ db_write_entry $file || die "error writing entry for $file"
+ else
+ echo "gensync: missing package: $pkgfile" >&2
+ fi
done
echo "gensync: compressing to $destfile..." >&2