#!/bin/bash if ! [ -d apt_main_archive ]; then echo "./apt_main_archive not found! Do you know what you're doing? :)" echo echo "Syncronises the central syn3 apt mirror with the syn3 svn tree." echo "Run this if there are new or changed syn3 packages you want to upload." exit 1 fi DEVDIR=./apt_main_archive/dev echo "Scanning svn tree..." for PKG in `find . -name *.pkg| sed 's#.*/##' | sed 's/.pkg$//' `; do echo -n "Checking $PKG: "; ./getdeb $PKG $DEVDIR || exit 1 done pushd $DEVDIR echo "Updating archive packages list..." apt-ftparchive packages -d=Packages.db . > Packages || exit 1 gzip -c Packages > Packages.gz || exit 1 echo "Releasing archive..." apt-ftparchive release . > Release || exit 1 echo "Signing the archive..." gpg -abs -o Release.gpg Release || exit 1 popd echo "Synconising the archive to the main mirror..." rsync...