您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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