-
Notifications
You must be signed in to change notification settings - Fork 1
/
pullcheck.sh
34 lines (24 loc) · 1.09 KB
/
pullcheck.sh
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
#!/bin/bash
# exit when any command fails
set -e
echo "================================================================="
echo "=== check which files changes in remote master before pulling ==="
echo "================================================================="
echo "=== git fetch ==="
echo "=== git diff --name-status ...origin ==="
echo "=== -r parameter for checking only yaml-generated files = $RFILES ==="
echo "=== git diff --name-status ...origin -- input/resources -- input/examples ==="
echo "================================================================="
git fetch
git diff --name-status ...origin
echo "================================================================="
echo "=== hit 'y' to pull ===="
echo "=== else any other key to abort ==="
echo "================================================================="
read var1
echo "================================================================="
echo "==================== you typed '$var1' ============================"
echo "================================================================="
if [ $var1 == "y" ]; then
git pull
fi