-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathstartFresh.sh
More file actions
executable file
·50 lines (42 loc) · 932 Bytes
/
startFresh.sh
File metadata and controls
executable file
·50 lines (42 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
clear
echo "-------- Update all repos! --------------"
# Edit these directories with the ones you want to update
repositories=('bob'
'browser-compat-data'
'css-examples'
'infra'
'interactive-examples'
'kuma'
'learning-area'
'mdn-dinocons'
'mdn-minimalist'
'yari'
);
# Edit this to your parent directory's path
SYSTEM_DIR=~/owd
branch='main'
origin='origin'
path=''
for i in "${repositories[@]}"
do
path="${SYSTEM_DIR}/$i"
cd ${path}
#content has different origing
if [[ i == content ]]
then
origin='mdn'
else
origin='origin'
fi
echo "- - - - - - - - - "
echo "respository: " ${i}
echo "branch: " ${branch}
git fetch upstream
git checkout ${branch}
git pull ${origin} ${branch}
git merge upstream/${branch}
git push origin ${branch}
done
# if you like your computer to talk to you
# say "Mission Accomplished"