forked from Piker-Alpha/acpiTableExtract.pl
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.command
More file actions
125 lines (110 loc) · 2.88 KB
/
install.command
File metadata and controls
125 lines (110 loc) · 2.88 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#!/bin/bash
# Download MaciASL/iasl62 and UEFIExtract NE
# Copy iasl and UEFIExtract to the App
# Copy UefiTableExtract.app to Applications folder
IASL_VERSION=iasl62
IASL_URL=https://github.com/acidanthera/MaciASL/raw/master/Dist/${IASL_VERSION}
UEFIEXTRACT_VERSION=UEFIExtract_NE_A55_mac
UEFIEXTRACT_URL=https://github.com/LongSoft/UEFITool/releases/download/A55/${UEFIEXTRACT_VERSION}.zip
directory=$(dirname "$0")
cd "$directory"
echo "Searching tools..."
TOOL=$(which iasl)
if [ -x "$TOOL" ]; then
echo "Using $TOOL."
else
echo ""
echo ""
echo "iasl not found!"
while true
do
read -p "Download and install $IASL_VERSION now? (y/n): " choice
case "$choice" in
[yY]* ) {
curl -L -O $IASL_URL
mv ./${IASL_VERSION} ./UefiTableExtract.app/Contents/MacOS/iasl
chmod +x ./UefiTableExtract.app/Contents/MacOS/iasl
}
break;;
[nN]* ) break;;
* ) echo "Try again...";;
esac
done
TOOL=./UefiTableExtract.app/Contents/MacOS/iasl
if [ -x "$TOOL" ]; then
echo "Using $TOOL."
else
echo ""
echo "ERROR: iasl not installed!"
echo ""
fi
fi
TOOL=$(which UEFIExtract)
if [ -x "$TOOL" ]; then
echo "Using $TOOL."
else
echo ""
echo ""
echo "UEFIExtract not found!"
while true
do
read -p "Download and install $UEFIEXTRACT_VERSION now? (y/n): " choice
case "$choice" in
[yY]* ) {
curl -L -O $UEFIEXTRACT_URL
unzip ./${UEFIEXTRACT_VERSION}.zip -d ./${UEFIEXTRACT_VERSION}
cp ./${UEFIEXTRACT_VERSION}/UEFIExtract ./UefiTableExtract.app/Contents/MacOS/UEFIExtract
chmod +x ./UefiTableExtract.app/Contents/MacOS/UEFIExtract
rm ./${UEFIEXTRACT_VERSION}.zip
rm -R ./${UEFIEXTRACT_VERSION}
}
break;;
[nN]* ) break;;
* ) echo "Try again...";;
esac
done
TOOL=./UefiTableExtract.app/Contents/MacOS/UEFIExtract
if [ -x "$TOOL" ]; then
echo "Using $TOOL."
else
echo ""
echo "ERROR: UEFIExtract not installed!"
echo ""
fi
fi
echo ""
installed=FALSE
while true
do
read -p "Copy UefiTableExtract to Applications? (y/n): " choice
case "$choice" in
[yY]* ) {
cp -rf ./UefiTableExtract.app /Applications
installed=TRUE
}
break;;
[nN]* ) break;;
* ) echo "Try again...";;
esac
done
if [ "$installed" == "TRUE" ]; then
while true
do
echo ""
read -p "Delete $directory ? (y/n): " choice
case "$choice" in
[yY]* ) {
cd ../
rm -R "$directory"
}
break;;
[nN]* ) break;;
* ) echo "Try again...";;
esac
done
fi
echo ""
echo "All done..."
# Game Over
#tput clear
osascript -e 'quit app "Terminal"'