| garciadeblas | 0e1bca5 | 2022-11-10 13:23:33 +0100 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | USER="$1" |
| 4 | NEWREPO="$2" |
| 5 | |
| 6 | git 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) |
| 7 | git 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 | |
| 9 | cp -r TEMPLATE/* ${NEWREPO}/ |
| 10 | cp TEMPLATE/.gitignore ${NEWREPO}/ |
| 11 | rm ${NEWREPO}/copytemplate.sh |
| 12 | |
| 13 | cd ${NEWREPO} |
| 14 | git add -A |
| 15 | git commit -s -m "Copy TEMPLATE files to this repo" |
| 16 | git push origin HEAD:refs/for/master |
| 17 | |