Skip to content

Commit 060f400

Browse files
committed
merge upstream for fork repo
1 parent ab57a1c commit 060f400

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

scripts/merge_upstream.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
3+
PATH_DEVOPS=$HOME/90DaysOfDevOps # If this doesn't match yours then adapt the variable
4+
5+
if [ -d "$PATH_DEVOPS" ]
6+
then
7+
echo "Directory 90DaysOfDevOps exists."
8+
echo "Starting to fetch upstream"
9+
10+
cd $PATH_DEVOPS
11+
12+
git fetch upstream
13+
sleep 3
14+
echo -ne '##### (33%)\r'
15+
sleep 1
16+
git merge upstream/main
17+
echo -ne '############# (66%)\r'
18+
sleep 1
19+
git push origin main
20+
echo -ne '####################### (100%)\r'
21+
echo -ne '\n'
22+
23+
else
24+
echo "Error: Directory /path/to/dir does not exists."
25+
fi
26+

0 commit comments

Comments
 (0)