summaryrefslogtreecommitdiff
path: root/t/lib-git-svn.sh
blob: 99ada71349c7eaa0536bba1d622f7f7ffa56110e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
. ./test-lib.sh
 
if test -n "$NO_SVN_TESTS"
then
	test_expect_success 'skipping git-svn tests, NO_SVN_TESTS defined' :
	test_done
	exit
fi
 
perl -e 'use SVN::Core; $SVN::Core::VERSION gt "1.1.0" or die' >/dev/null 2>&1
if test $? -ne 0
then
	test_expect_success 'Perl SVN libraries not found, skipping test' :
	test_done
	exit
fi
 
GIT_DIR=$PWD/.git
GIT_SVN_DIR=$GIT_DIR/svn/git-svn
SVN_TREE=$GIT_SVN_DIR/svn-tree
 
svnadmin >/dev/null 2>&1
if test $? -ne 1
then
    test_expect_success 'skipping git-svn tests, svnadmin not found' :
    test_done
    exit
fi
 
svn >/dev/null 2>&1
if test $? -ne 1
then
    test_expect_success 'skipping git-svn tests, svn not found' :
    test_done
    exit
fi
 
svnrepo=$PWD/svnrepo
 
set -e
 
if svnadmin create --help | grep fs-type >/dev/null
then
	svnadmin create --fs-type fsfs "$svnrepo"
else
	svnadmin create "$svnrepo"
fi
 
svnrepo="file://$svnrepo"