#!/bin/sh

echo "getting sources..."
  svn co svn://svn.eglibc.org/branches/eglibc-2_11/localedef eglibc-localedef-2.11-latest

echo "getting version..."
  cd eglibc-localedef-2.11-latest
    SVN_REV=`LANG=C svn info 2>/dev/null | grep Revision: | sed -e 's/.*\: //'`
    echo $SVN_REV
  cd ..

echo "copying sources..."
  rm -rf eglibc-localedef-2.11-$SVN_REV
  cp -R eglibc-localedef-2.11-latest eglibc-localedef-2.11-$SVN_REV

echo "cleaning sources..."
  find eglibc-localedef-2.11-$SVN_REV -name .svn -exec rm -rf {} ";"

echo "packing sources..."
  tar cvjf eglibc-localedef-2.11-$SVN_REV.tar.bz2 eglibc-localedef-2.11-$SVN_REV

echo "remove temporary sourcedir..."
  rm -rf eglibc-localedef-2.11-$SVN_REV
