We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db578d9 commit fb48bd0Copy full SHA for fb48bd0
update.sh
@@ -1,13 +1,15 @@
1
#!/usr/bin/env bash
2
cd "$(dirname "$0")"
3
4
-NEW_COMMITS="$(git rev-list HEAD...origin/"$(git branch --show-current)" --count)"
5
-
6
-if [ "$NEW_COMMITS" -gt "0" ]; then
7
- echo "Update available!"
8
-else
9
- echo "No update available."
10
- exit 0
+if [ "$1" != "force" ]; then
+ git fetch
+ NEW_COMMITS="$(git rev-list HEAD...origin/"$(git branch --show-current)" --count)"
+ if [ "$NEW_COMMITS" -gt "0" ]; then
+ echo "Update available!"
+ else
+ echo "No update available. Use '$0 force' to skip the check."
11
+ exit 0
12
+ fi
13
fi
14
15
NEED_RESTART=0
0 commit comments