Advertisement
Guest User

CentOS Repo Server

a guest
Feb 12th, 2013
870
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. #!/bin/bash
  2. #repo-setup.sh
  3.  
  4. verlist="5 6"
  5. archlist="x86_64 i386"
  6. baselist="addons contrib extras iso os updates"
  7. local=/var/www/html/centos
  8.  
  9. for ver in $verlist
  10. do
  11. for base in $baselist
  12. do
  13. for arch in $archlist
  14. do
  15. path=$local/$ver/$base/$arch/
  16. mkdir -pv $path
  17. cd $path
  18. reposync .
  19. done
  20. done
  21. done
  22.  
  23. #!/bin/bash
  24. # repo-sync.sh
  25.  
  26. rsync="rsync -avrt --exclude=debug/"
  27. mirror=rsync://mirrors.kernel.org/centos
  28. verlist="5 6"
  29. archlist="x86_64 i386"
  30. baselist="addons contrib extras iso os updates"
  31. local=/var/www/html/centos
  32.  
  33. for ver in $verlist
  34. do
  35. for base in $baselist
  36. do
  37. for arch in $archlist
  38. do
  39. path="$ver/$base/$arch/"
  40. $rsync $mirror/$path $local/$path
  41. done
  42. done
  43. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement