contrib / git-svn / t / lib-git-svn.shon commit git-grep: fix exit code when we use external grep. (fcfe34b)
   1PATH=$PWD/../:$PATH
   2if test -d ../../../t
   3then
   4    cd ../../../t
   5else
   6    echo "Must be run in contrib/git-svn/t" >&2
   7    exit 1
   8fi
   9
  10. ./test-lib.sh
  11
  12GIT_DIR=$PWD/.git
  13GIT_SVN_DIR=$GIT_DIR/svn/git-svn
  14SVN_TREE=$GIT_SVN_DIR/svn-tree
  15
  16svnadmin >/dev/null 2>&1
  17if test $? != 1
  18then
  19    test_expect_success 'skipping contrib/git-svn test' :
  20    test_done
  21    exit
  22fi
  23
  24svn >/dev/null 2>&1
  25if test $? != 1
  26then
  27    test_expect_success 'skipping contrib/git-svn test' :
  28    test_done
  29    exit
  30fi
  31
  32svnrepo=$PWD/svnrepo
  33
  34set -e
  35
  36if svnadmin create --help | grep fs-type >/dev/null
  37then
  38        svnadmin create --fs-type fsfs "$svnrepo"
  39else
  40        svnadmin create "$svnrepo"
  41fi
  42
  43svnrepo="file://$svnrepo/test-git-svn"
  44
  45