mplayer-snapshot-vine.sh 784 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/bash
  2. set -e
  3. tmp=$(mktemp -d)
  4. trap cleanup EXIT
  5. cleanup() {
  6. set +e
  7. [ -z "$tmp" -o ! -d "$tmp" ] || rm -rf "$tmp"
  8. }
  9. unset CDPATH
  10. pwd=$(pwd)
  11. #svn=$(date +%Y-%m-%d)
  12. svn=2010-07-02
  13. #dirname=mplayer-export-$svn
  14. dirname=mplayer-export-`echo $svn | sed s/-//g`
  15. mplayer_rev={$svn}
  16. cd "$tmp"
  17. svn checkout -r ${mplayer_rev} svn://svn.mplayerhq.hu/mplayer/trunk $dirname
  18. cd $dirname
  19. rm -rf libdvdcss
  20. for dir in libav* libdvd* libpostproc ; do
  21. cd $dir
  22. svn update -r ${mplayer_rev}
  23. cd ..
  24. done
  25. svn_revision=`LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2`
  26. sed -i -e 's/\(SVN-r[0-9]* \)/\1vine /' -e "s/UNKNOWN/SVN-r$svn_revision/" version.sh
  27. find . -type d -name .svn -print0 | xargs -0r rm -rf
  28. cd ..
  29. tar jcf "$pwd"/$dirname.tar.bz2 $dirname
  30. cd - >/dev/null