Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- host="example.com"
- gitolite="/home/user/gitolite-admin";
- current=$(pwd)
- if [ $# -eq 2 ]; then
- repo=$1;
- repo_path=$2;
- else
- echo "usage: $0 repo repo_path";
- exit -1
- fi
- cd $gitolite
- vim conf/gitolite.conf && git add . && git commit -am "$repo" && git push
- cd $current
- cd $repo_path
- git init && vim .gitignore && git add . && git status
- echo -n "continue? (y/n): "
- read ans
- if [ "$ans" == "y" ]; then
- git commit -am "initial" && git remote add origin git@$host:$repo && git push origin master
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement