18 lines
409 B
Bash
18 lines
409 B
Bash
#!/bin/bash
|
|
|
|
repo="$1"
|
|
|
|
if [ -z "$repo" ]; then
|
|
echo "Usage: set-desc <repo.git> <description>"
|
|
exit 1
|
|
fi
|
|
|
|
remote_path="/home/git/hub/$repo.git"
|
|
|
|
mkdir -p /home/git/hub/$remote_path
|
|
cd /home/git/hub/$remote_path
|
|
git init --bare
|
|
cp '/home/git/hub/dotfiles.git/hooks/post-receive' '/home/git/hub/$remote_path/hooks/' &&
|
|
echo "Created git:$remote_path"
|
|
/home/git/hub/$repo/hooks/post-receive < /dev/null
|