forked from crazybirdy/MBR-Manual-Method
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RunMe
86 lines (82 loc) · 2 KB
/
RunMe
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/bin/bash
printf '\033[8;30;100t'
clear
version=1.0.1
MBRLink='https://github.com/crazybirdy/MBR-Manual-Method.git'
function downloadMBR() {
if [[ ! -d "$HOME/MBR-Manual-Method" ]]; then
echo
cd "$HOME"
git clone $MBRLink
echo
echo "git clone is done."
echo
fi
}
function updateMBR() {
cd "$HOME/MBR-Manual-Method"
if [[ -d .git ]]; then
echo
git fetch --all
git reset --hard origin/master
git pull origin master
else
cd "$HOME"
rm -rf "$HOME/MBR-Manual-Method"
downloadMBR
fi
open "$HOME/MBR-Manual-Method"
open https://github.com/crazybirdy/MBR-Manual-Method
echo
}
function fixpermission() {
FileNameArray=(
EasyMBR-Installer1013
EasyMBR-Installer1015
EasyMBR-Installer10156
RunMe
Old-macOS-10+11+12/installScript_1012fullapp
Q3-HFS+UpdateCache/copytempdata
Q3-HFS+UpdateCache/hfsupdatecache
Q4-mojave2core/mojave2core
Q5-AppleAHCIPort/ich10fix
Q6-DownloadFullApp/installScript_1013fullapp
Q6-DownloadFullApp/installScript_1014fullapp
Q6-DownloadFullApp/installScript_1015fullapp
Q6-DownloadFullApp/installScript_110fullapp
Q6-DownloadFullApp/installScript_allfullapp
Q6-DownloadFullApp/installScript_BaseSystem
Q7-Update-installScript/dm
Q7-Update-installScript/installScript_1013update
Q7-Update-installScript/installScript_1014update
Q7-Update-installScript/installScript_1015update
VMwareISOCreater/VMwareISOCreater
)
let index=0
for filename in "${FileNameArray[@]}"; do
if [[ -f "$HOME/MBR-Manual-Method/${filename}" ]]; then
chmod +x "$HOME/MBR-Manual-Method/${filename}"
fi
let index++
done
}
function untargz() {
cd "$HOME/MBR-Manual-Method"
rm -rf System
rm -rf System1015
tar zxvf System.tar.gz 2>/dev/null
tar zxvf System1015.tar.gz 2>/dev/null
echo
}
function main()
{
echo
echo "This script will download the MBR-Manual-Method files to $HOME/MBR-Manual-Method."
echo
downloadMBR
updateMBR
fixpermission
untargz
}
main
exit 0