blob: c5e60977397c3bf7945ce7d1299560e66d29a549 (
plain)
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
|
#!/bin/bash
export supertitle="Probe HDMI"
source easybashgui
INET_AVAILABLE=0
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
# =====================================================================================
# Functions in order they get called #
# =====================================================================================
function check_internet() {
wait_seconds 2
wget -P $DIR http://google.com/robots.txt &> /dev/null
return_code=$?
[ $return_code -eq 0 ] && INET_AVAILABLE=1
rm $DIR/robots.txt
}
# ======================================================================================
function pull_updates() {
# If internet available just merge the changes
[ $INET_AVAILABLE -eq 1 ] && cd $DIR && git pull>/dev/null 2>&1
}
check_internet
pull_updates
bash $DIR/probe-hdmi.sh&
|