mirror of the now-defunct rocklinux.org
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.

44 lines
957 B

  1. #!/bin/sh
  2. #
  3. # Usage: update-gnome.sh [-n] gnome-version
  4. #
  5. # -n prints the package that will be updated with their new versions
  6. # without making any changes
  7. #
  8. dry=0
  9. if [ "$1" = "-n" ] ; then
  10. dry=1
  11. shift
  12. fi
  13. ver=$1
  14. major="${ver%.*}"
  15. rev="${ver##*.}"
  16. baseurl="http://ftp.gnome.org/pub/GNOME"
  17. urlplatform="$baseurl/platform/$major/$major.$rev/sources/"
  18. urldesktop="$baseurl/desktop/$major/$major.$rev/sources/"
  19. for url in $urlplatform $urldesktop; do
  20. wget -q -O - $url | \
  21. sed -n '/id="body"/,/\/div/{/tar.bz2/p}' | \
  22. sed -r 's/^.*href="([^"]*).tar.bz2".*$/\1/' | \
  23. tr 'A-Z' 'a-z' | \
  24. sed -e 's/gtk-doc/gtkdoc/' -e 's/libart_lgpl/libart_lgpl23/' | \
  25. while read newver; do
  26. pkg="${newver%-*}"
  27. pkgver="${newver##*-}"
  28. if [ -d package/*/$pkg ]; then
  29. if [ $dry = 1 ] ; then
  30. echo $pkg-$pkgver
  31. else
  32. ./scripts/Create-PkgUpdPatch $pkg-$pkgver | \
  33. patch -p0
  34. fi
  35. else
  36. echo "$pkg is not a rock package yet"
  37. fi
  38. done
  39. done