Fix git-fetch-script breakage
[git/gitweb.git] / git-sh-setup-script
blob660c524ce86dfdcf818a1e6698ddf135bac28a58
1 #!/bin/sh
3 # Set up GIT_DIR and GIT_OBJECT_DIRECTORY
4 # and return true if everything looks ok
6 : ${GIT_DIR=.git}
7 : ${GIT_OBJECT_DIRECTORY="$GIT_DIR/objects"}
9 die() {
10 echo "$@" >&2
11 exit 1
14 [ -d "$GIT_DIR" ] &&
15 [ -d "$GIT_DIR/refs" ]
16 [ -d "$GIT_OBJECT_DIRECTORY" ] &&
17 [ -d "$GIT_OBJECT_DIRECTORY/00" ]