1#!/bin/bash 2# 3# Copyright 2013 The Android Open Source Project. 4# 5# Retrieves the current Mockito source code into the current direcory, exlcuding portions related 6# to constructing Mock objects in the JVM. 7 8SOURCE="git://github.com/mockito/mockito.git" 9INCLUDE=" 10 LICENSE 11 src 12 " 13 14EXCLUDE=" 15 src/org/mockito/internal/creation/cglib 16 src/org/mockito/internal/creation/jmock 17 src/org/mockito/internal/creation/AbstractMockitoMethodProxy.java 18 src/org/mockito/internal/creation/AcrossJVMSerializationFeature.java 19 src/org/mockito/internal/creation/CglibMockMaker.java 20 src/org/mockito/internal/creation/DelegatingMockitoMethodProxy.java 21 src/org/mockito/internal/creation/MethodInterceptorFilter.java 22 src/org/mockito/internal/creation/MockitoMethodProxy.java 23 src/org/mockito/internal/creation/SerializableMockitoMethodProxy.java 24 src/org/mockito/internal/invocation/realmethod/FilteredCGLIBProxyRealMethod.java 25 src/org/mockito/internal/invocation/realmethod/CGLIBProxyRealMethod.java 26 src/org/mockito/internal/invocation/realmethod/HasCGLIBMethodProxy.java 27 " 28 29working_dir="$(mktemp -d)" 30trap "echo \"Removing temporary directory\"; rm -rf $working_dir" EXIT 31 32echo "Fetching Mockito source into $working_dir" 33git clone $SOURCE $working_dir/source 34 35for include in ${INCLUDE}; do 36 echo "Updating $include" 37 rm -rf $include 38 cp -R $working_dir/source/$include . 39done; 40 41for exclude in ${EXCLUDE}; do 42 echo "Excluding $exclude" 43 rm -r $exclude 44done; 45 46echo "Done" 47 48