This repository has been archived on 2025-09-04. You can view files and clone it, but cannot push or open issues or pull requests.
oshgit/new-repo.sh
2020-10-25 13:12:56 +01:00

21 lines
367 B
Bash
Executable file

#!/bin/sh
set -e
cd $(dirname $0)
for name in $@; do
dir="../$name.git"
url="ssh://osh@192.168.2.6:/~/git/$name.git"
mkdir $dir
git -C $dir init --bare
echo "Oshgnacknak" > $dir/owner
echo $url > $dir/url
${EDITOR:-vi} $dir/description
ln -sr post-receive.sh $dir/hooks/post-receive
./build.sh $dir
echo "Clone: $url"
done