-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstaller.php
More file actions
43 lines (32 loc) · 928 Bytes
/
installer.php
File metadata and controls
43 lines (32 loc) · 928 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
38
39
40
41
42
43
<?php
$status = "done";
if(isset($_GET[status])){
echo $status; exit(0);
}
if(isset($_GET[size])){
$size = $_GET[size];
$name = $_GET[name];
$dest = $_GET[dest];
$got = 0;
if($dest == "usb"){
//get size on USB
$got = exec("du /usb/tmp/infusions/mk4-module-$name* | awk '{print $1}'");
}else{
//get size on internal
$got = exec("du /tmp/infusions/mk4-module-$name* | awk '{print $1}'");
}
if($got >= $size){ echo "complete"; exit(0); }
$percent = round(($got/$size)*100, 1);
echo "<br />[ ";
for($i = 0; $i <= $percent/2; $i++){
if($i == 0){
}else echo "|";
}
for($i = 0; $i <= (100-$percent)/2; $i++){
echo " ";
}
echo " ]<br />";
echo "$percent %"; exit(0);
}
exec("echo \"sh /pineapple/modules/installer.sh $_GET[name] $_GET[version] $_GET[dest] $_GET[md5]\" | at now");
?>