File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ for i in ${DIRECTORIES}; do
1010 if [[ -d ./$i ]]
1111 then
1212 echo " Skipping $i since directory exists in $( pwd) "
13+ continue
1314 fi
1415
1516 if [[ -d $1 /$i ]]
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -x
3+
4+ DIRECTORIES=" binutils-gdb newlib gcc glibc linux qemu"
5+
6+ for i in ${DIRECTORIES} ; do
7+ if [[ ! -d ./$i ]]
8+ then
9+ echo " Skipping $i since directory does not exist."
10+ continue
11+ fi
12+
13+ pushd $i
14+ ORIGIN_URL=$( git remote -v | grep push | cut -f2 | cut -d' ' -f1)
15+ HTTPS_REPO=$( echo ${ORIGIN_URL} | grep https | wc -l)
16+ if test " x${HTTPS_REPO} " = " x1"
17+ then
18+ GIT_URL=$( echo ${ORIGIN_URL} | sed " s/https:\/\//git@/g" | sed " s/\//:/" )
19+ # echo $ORIGIN_URL
20+ # echo $GIT_URL
21+ git remote rename origin origin_old
22+ git remote add origin ${GIT_URL}
23+ git remote remove origin_old
24+ git fetch --unshallow
25+ else
26+ echo " $i has no https repo."
27+ fi
28+ popd
29+ done
You can’t perform that action at this time.
0 commit comments