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