Browse Source

Update package if checksum changed

master
mid-kid 8 years ago
parent
commit
6fb97e253b
  1. 27
      update-repo.sh

27
update-repo.sh

@ -46,12 +46,24 @@ find . -regex '.*\.t[bglx]z$' | while read -r package; do
pkgsize="$cachedir/$pkgdir/$pkgbase.size" pkgsize="$cachedir/$pkgdir/$pkgbase.size"
pkgusize="$cachedir/$pkgdir/$pkgbase.usize" pkgusize="$cachedir/$pkgdir/$pkgbase.usize"
[ -f "$pkgtxt" -a \ pkgsum="$cachedir/$pkgdir/$pkgbase.checksum"
-f "$pkgmeta" -a \
-f "$pkgmanifest" -a \ skip=false
-f "$pkgsize" -a \
-f "$pkgusize" ] && continue if [ -f "$pkgtxt" -a \
[ "$gpgkey" -a -f "$package.asc" ] && continue -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..." echo "Adding $package..."
mkdir -p "$cachedir/$pkgdir" mkdir -p "$cachedir/$pkgdir"
@ -97,6 +109,9 @@ EOF
# Remove decompressed package # Remove decompressed package
rm -f "$tmppkg" rm -f "$tmppkg"
# Save checksum
md5sum "$package" > "$pkgsum"
done done
# Generate shitty ChangeLog.txt # Generate shitty ChangeLog.txt

Loading…
Cancel
Save