#!/bin/sh # This script is used to setup a git repository for use by the Debian Islamic # packages. # # Shamessly borrowed from pkg-perl set -e USAGE="\n\ This script is used to perform the operations needed to create a git\n\ repository for use by the Debian Islamic packages.\n\ \n\ Usage: setup-repository ''\n\ \n\ Options: is the package name a git repository is being created for.\n\ is a description for the git repository.\n\ It should be something like 'Packaging for '.\n" if [ "$#" -ne "2" ]; then echo -e "${USAGE}" exit 1 fi PACKAGE="$1" DESCRIPTION="$2" # Create the repository mkdir $PACKAGE.git cd $PACKAGE.git /usr/bin/git --bare init --shared # Add the repository description echo $DESCRIPTION >description # Enable the hook scripts mv hooks/post-update.sample hooks/post-update /usr/bin/git config --add hooks.mailinglist "debian-islamic-commits@lists.alioth.debian.org" /usr/bin/git config --add hooks.cia-project debian-islamic cat >hooks/post-receive <