Skip to content

Commit 7da5b37

Browse files
author
Cupertino Miranda
committed
Added script to unshallow and ssh git repos.
Fixed older script.
1 parent e42b7cb commit 7da5b37

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

scripts/link_sources_to_directory.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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 ]]

scripts/turnon_developer_mode.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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

0 commit comments

Comments
 (0)