2 #if [[ $(git branch | awk '($1 == "*") {print $2}') != master ]] ; then
3 # echo "Switch to master first"
7 if git config svn-remote.svn.url
>/dev
/null
; then
8 # git-config uses svn.authorsfile relative to repo root
9 # i.e. good to use .git/authors
10 set -- git svn fetch
--all "$@"
12 elif git config remote.hg.url
>/dev
/null
; then
14 elif git config cvs.cvsroot
>/dev
/null
; then
15 # authors file is at .git/cvs-authors
16 set -- git cvsimport
-a -d $
(git config cvs.cvsroot
) $
(git config cvs.module
) "$@"
17 expected
="Already up-to-date."
18 elif [[ -d CVS
]] && git rev-parse origin
>/dev
/null
; then
19 set -- git cvsimport
-a
20 expected
="Already up-to-date."
23 expected
="Already up-to-date."
27 "$@" |
tee /proc
/$$
/fd
/1
28 _pipestatus
=${PIPESTATUS[*]}
29 [[ ${_pipestatus// /} -eq 0 ]] ||
exit 1
31 [[ ${output} == "${expected}" ]] && exit 0