You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

grab-packages.sh 537B

12345678910111213
  1. #!/bin/sh
  2. # Get an installed package manifest
  3. set -e
  4. cd /var/cache/apt/archives
  5. # make sure all packages with installed versions are downloaded
  6. # (except for held packages, which may not be available for download)
  7. dpkg-query -W -f '${Status}\t${Package}=${Version}\n' | grep -v ^hold | cut -f2- | xargs -n 50 apt-get install -q --reinstall -y -d > /tmp/download.log
  8. grep "cannot be downloaded" /tmp/download.log && { echo Could not download some packages, please run gbuild --upgrade 1>&2 ; exit 1 ; }
  9. sha256sum *.deb | sort --key 2