lxc-images.sh 524 B

12345678910111213141516
  1. #!/bin/bash
  2. function sync_lxc_images() {
  3. repo_url="$1"
  4. repo_dir="$2"
  5. [ ! -d "$repo_dir" ] && mkdir -p "$repo_dir"
  6. cd $repo_dir
  7. # lftp "${repo_url}/" -e "mirror --verbose --log=${TUNASYNC_LOG_FILE} --exclude-glob='*/SRPMS/*' -P 5 --delete --only-newer; bye"
  8. lftp "${repo_url}/" -e "mirror --verbose -P 5 --delete --only-newer; bye"
  9. }
  10. sync_lxc_images "http://images.linuxcontainers.org/images" "${TUNASYNC_WORKING_DIR}/images"
  11. sync_lxc_images "http://images.linuxcontainers.org/meta" "${TUNASYNC_WORKING_DIR}/meta"