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.

21 lines
613 B

  1. #!/usr/bin/env bash
  2. DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
  3. cd $DIR
  4. unset DIR
  5. # Prepare and download packages
  6. pdir="/offline_packages"
  7. mkdir -p "$(pwd)${pdir}"
  8. cd "$(pwd)${pdir}"
  9. SELECTED_PACKAGES="wget unzip curl tar docker.io docker-compose"
  10. apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests \
  11. --no-conflicts --no-breaks --no-replaces --no-enhances \
  12. --no-pre-depends ${SELECTED_PACKAGES} | grep "^\w")
  13. # Build package index
  14. sudo apt-get install -y dpkg-dev
  15. dpkg-scanpackages "." /dev/null | gzip -9c > Packages.gz
  16. echo "Packages extracted to: $(pwd)${pdir}"