10 lines
225 B
Bash
Executable file
10 lines
225 B
Bash
Executable file
#!/bin/bash
|
|
if [ "$#" -ne 1 ]; then
|
|
echo "Usage: create <path_to_repository>"
|
|
exit 1
|
|
fi
|
|
|
|
REPO_PATH="/srv/git/$1"
|
|
mkdir -p "$REPO_PATH"
|
|
cd "$REPO_PATH" && git init --bare
|
|
echo "New bare git repo created at $REPO_PATH"
|