Skip to content

Instantly share code, notes, and snippets.

@simonszu
Created June 16, 2015 17:41
Show Gist options
  • Select an option

  • Save simonszu/c15fe13adb19cd592d66 to your computer and use it in GitHub Desktop.

Select an option

Save simonszu/c15fe13adb19cd592d66 to your computer and use it in GitHub Desktop.
Create a new bare repo in Cgit's path
#! /bin/bash
# This script creates a new bare git repo and adds it to cgit
echo -n "Enter the name and press [ENTER]:"
read name
echo -n "Enter the description and press [ENTER]:"
read description
echo -n "Enter a mail address and press [ENTER]:"
read mail
cd /home/simonszu/repos
git init --bare $name
cd /home/simonszu/repos
echo "" >> cgitrepos
echo "repo.url=$name" >> cgitrepos
echo "repo.path=/home/simonszu/repos/$name" >> cgitrepos
echo "repo.desc=$description" >> cgitrepos
echo "repo.owner=$mail" >> cgitrepos
echo "Remote git path: simonszu@eridanus.uberspace.de:repos/$name"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment