2020-01-13 08:14:32 -08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
if [ $# != 1 ]
|
|
|
|
then
|
|
|
|
echo "Usage: $0 <vendor>"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
vendor=$1
|
|
|
|
upstream=`git config --get "gcc-config.upstream"`
|
|
|
|
if [ x"$upstream" = x ]
|
|
|
|
then
|
|
|
|
echo "Config gcc-config.upstream not set, run contrib/gcc-git-customization"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2020-01-13 10:20:13 -08:00
|
|
|
echo "setting up git to fetch vendor ${vendor} to remotes/${upstream}/${vendor}"
|
2020-01-13 10:37:55 -08:00
|
|
|
git config --replace-all "remote.${upstream}.fetch" "+refs/vendors/${vendor}/heads/*:refs/remotes/${upstream}/${vendor}/*" ":refs/remotes/${upstream}/${vendor}/"
|
2020-01-13 08:14:32 -08:00
|
|
|
git config --replace-all "remote.${upstream}.fetch" "+refs/vendors/${vendor}/tags/*:refs/tags/${vendor}/*" ":refs/tags/${vendor}/"
|
|
|
|
git fetch
|