forked from omgmog/install-all-firefox
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.sh
More file actions
executable file
·37 lines (32 loc) · 899 Bytes
/
bootstrap.sh
File metadata and controls
executable file
·37 lines (32 loc) · 899 Bytes
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
32
33
34
35
36
37
#!/bin/bash
# Bootstrap to check for script updates before running ./install-all-firefox.sh
error(){
printf "\n\033[31m$*\033[00m"
return 0
}
if [ `uname -s` != "Darwin" ]
then
error "This script is designed to be run on OS X\nExiting...\n"
exit 0
fi
local_script_md5=`md5 -q install-all-firefox.sh`
remote_script_md5=''
while [ "${remote_script_md5}" == "" ]
do
if curl -C -L "https://raw.github.com/omgmog/install-all-firefox/master/install-all-firefox.sh" -o "/tmp/install-all-firefox.sh"
then
chmod +x "/tmp/install-all-firefox.sh"
remote_script_md5=`md5 -q /tmp/install-all-firefox.sh`
fi
done
if [ ! "${local_script_md5}" == "${remote_script_md5}" ]
then
cp /tmp/install-all-firefox.sh ./install-all-firefox.sh
chmod +x ./install-all-firefox.sh
fi
if [ "$1" == "" ]
then
./install-all-firefox.sh "status"
else
./install-all-firefox.sh "${*}"
fi