1#!/bin/bash
2#
3# Copyright 2013 The Android Open Source Project.
4#
5# Retrieves the current Objenesis source code into the current directory.
6# Does not create a GIT commit.
7
8SOURCE="http://objenesis.googlecode.com/svn/trunk/"
9INCLUDE="
10    LICENSE.txt
11    main
12    tck
13    tck-android
14    "
15
16working_dir="$(mktemp -d)"
17trap "echo \"Removing temporary directory\"; rm -rf $working_dir" EXIT
18
19echo "Fetching Objenesis source into $working_dir"
20svn export -q $SOURCE $working_dir/source
21
22for include in ${INCLUDE}; do
23  echo "Updating $include"
24  rm -rf $include
25  cp -R $working_dir/source/$include .
26done;
27
28echo "Done"
29
30