Makefile: better "github-ssh" target

This commit is contained in:
Ștefan Talpalaru 2019-02-21 23:46:28 +01:00 committed by zah
parent 63a976868d
commit 9806110979
2 changed files with 8 additions and 4 deletions

View File

@ -149,10 +149,8 @@ mrproper: clean
# for when you want to use SSH keys with GitHub
github-ssh:
sed -i 's#https://github.com/#git@github.com:#' .git/config
git config --file .gitmodules --get-regexp url | while read LINE; do \
git config `echo $${LINE} | sed 's#https://github.com/#git@github.com:#'` \
;done
git config url."git@github.com:".insteadOf "https://github.com/"
git submodule foreach --recursive 'git config url."git@github.com:".insteadOf "https://github.com/"'
#- re-builds the Nim compiler (not usually needed, because `make update` does it when necessary)
#- allows parallel building with the '+' prefix

View File

@ -108,6 +108,12 @@ make V=0 # quiet
make V=2 test # more verbose than usual
```
- if you want to use SSH keys with GitHub:
```bash
make github-ssh
```
#### Git submodule workflow
Working on a dependency: