blob: eb0d8e59c59f4180dbee1ce6b3e3f2c0fe33b51b [file] [log] [blame]
garciadeblas0e1bca52022-11-10 13:23:33 +01001#!/bin/bash
2
3USER="$1"
4NEWREPO="$2"
5
6git clone "ssh://${USER}@osm.etsi.org:29418/TEMPLATE" && (cd "TEMPLATE" && curl https://osm.etsi.org/gerrit/tools/hooks/commit-msg > .git/hooks/commit-msg ; chmod +x .git/hooks/commit-msg)
7git clone "ssh://${USER}@osm.etsi.org:29418/osm/${NEWREPO}" && (cd "${NEWREPO}" && curl https://osm.etsi.org/gerrit/tools/hooks/commit-msg > .git/hooks/commit-msg ; chmod +x .git/hooks/commit-msg)
8
9cp -r TEMPLATE/* ${NEWREPO}/
10cp TEMPLATE/.gitignore ${NEWREPO}/
11rm ${NEWREPO}/copytemplate.sh
12
13cd ${NEWREPO}
14git add -A
15git commit -s -m "Copy TEMPLATE files to this repo"
16git push origin HEAD:refs/for/master
17