aboutsummaryrefslogtreecommitdiff
path: root/git_create_shared_git_repo.sh
blob: b550a4e8f03100bac5822d4745acb035a5a2eb16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env sh

# Used in home server setup.
#
#
GIT_BASE_PATH="/srv/git"

path="$GIT_BASE_PATH/$1"
prev="$(pwd)"
echo "Creating directory in $path"
mkdir -p "$path"
cd "$path" || return
echo "Setting up git files in $path"
git init --bare --shared
git config --file config http.receivepack true
echo "Completed setup, returning to $prev"
cd "$prev" || return
echo "done"