We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab57a1c commit 060f400Copy full SHA for 060f400
scripts/merge_upstream.sh
@@ -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
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