diff --git a/update-repo.sh b/update-repo.sh index a4d0ff8..73c3e81 100755 --- a/update-repo.sh +++ b/update-repo.sh @@ -46,12 +46,24 @@ find . -regex '.*\.t[bglx]z$' | while read -r package; do pkgsize="$cachedir/$pkgdir/$pkgbase.size" pkgusize="$cachedir/$pkgdir/$pkgbase.usize" - [ -f "$pkgtxt" -a \ - -f "$pkgmeta" -a \ - -f "$pkgmanifest" -a \ - -f "$pkgsize" -a \ - -f "$pkgusize" ] && continue - [ "$gpgkey" -a -f "$package.asc" ] && continue + pkgsum="$cachedir/$pkgdir/$pkgbase.checksum" + + skip=false + + if [ -f "$pkgtxt" -a \ + -f "$pkgmeta" -a \ + -f "$pkgmanifest" -a \ + -f "$pkgsize" -a \ + -f "$pkgusize" -a \ + -f "$pkgsum" ]; then + if [ "$gpgkey" ]; then + if [ -f "$package.asc" ]; then + md5sum --status -c "$pkgsum" && continue + fi + else + md5sum --status -c "$pkgsum" && continue + fi + fi echo "Adding $package..." mkdir -p "$cachedir/$pkgdir" @@ -97,6 +109,9 @@ EOF # Remove decompressed package rm -f "$tmppkg" + + # Save checksum + md5sum "$package" > "$pkgsum" done # Generate shitty ChangeLog.txt