Project

General

Profile

osmo-gerrit.sh

script to add gerit remote and change-id pre-commit hook - laforge, 06/12/2018 05:06 PM

 
1
#!/bin/sh
2
REPO="$1"
3
USER=laforge
4
PORT=29418
5
HOST=gerrit.osmocom.org
6
if [ ! -f .git/config ]; then
7
	echo you need to execute this from within the root of the repo
8
	exit 1
9
fi
10
git remote add gerrit "ssh://$USER@$HOST:$PORT/$REPO"
11
scp -P $PORT $USER@$HOST:hooks/commit-msg .git/hooks/
Add picture from clipboard (Maximum size: 48.8 MB)