Advertisement
gdeff

Untitled

Jan 17th, 2021 (edited)
702
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. repo=https://linux-repo.us.securitycloud.symantec.com
  2. sep=sep_linux/14.3RU1
  3.  
  4. arch=x86_64
  5. for linux in amazonlinux2 rhel6 rhel7 rhel8 sles12 sles15; do
  6. base=$repo/$sep/$linux/$arch
  7. url=$base/$(curl -s $base/repodata/repomd.xml | grep -oP 'repodata.*primary.xml.gz')
  8. pkgs=($(curl -s $url | gunzip | grep -oP 'sdcss.*?.rpm(?="/>)'))
  9. for p in ${pkgs[@]}; do wget -nc $base/$p -P $(pwd)/$linux/; done
  10. done
  11.  
  12. arch=amd64
  13. for linux in ubuntu14 ubuntu16 ubuntu18 ubuntu20; do
  14. base=$repo/$sep/$linux
  15. url=$base/dists/$sep/main/binary-$arch/Packages
  16. pkgs=($(curl -s $url | grep -oP '(?<=Filename: ).*?\.deb'))
  17. for p in ${pkgs[@]}; do wget -nc $base/$p -P $(pwd)/$linux/; done
  18. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement