Created
March 25, 2021 22:42
-
-
Save MarisaKirisame/b7fbb04bf5cedf5ae978f85dac51d79e to your computer and use it in GitHub Desktop.
fetch.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
set -x | |
mkdir $1 | |
cd $1 | |
gclient root | |
gclient config --spec "solutions = [ | |
{ | |
\"name\": \"src\", | |
\"url\": \"[email protected]:MarisaKirisame/$1.git\", | |
\"managed\": False, | |
\"custom_deps\": {}, | |
\"custom_vars\": {}, | |
}, | |
] | |
" | |
gclient sync --nohooks --no-history | |
echo 'I had clone the repo without history. In order to fetch other branch you have to unshallow it till they exist.' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment