mirror of
https://git.freebsd.org/ports.git
synced 2025-05-14 08:11:50 -04:00
75 lines
3 KiB
HTML
75 lines
3 KiB
HTML
--- plugins/human/templates/human.html 2024-02-16 15:54:12.707381000 -0500
|
|
+++ plugins/human/templates/human.html 2024-02-16 16:00:05.903013000 -0500
|
|
@@ -106,6 +106,7 @@
|
|
<select x-model="selectedPlatform" id="base-platform">
|
|
<option value="" disabled>Select target OS</option>
|
|
<option value="darwin">MacOS</option>
|
|
+ <option value="freebsd">FreeBSD</option>
|
|
<option value="linux">Linux</option>
|
|
<option value="windows-psh">Windows (PowerShell)</option>
|
|
</select>
|
|
@@ -349,7 +350,8 @@
|
|
if (
|
|
this.selectedPlatform != "linux" &&
|
|
this.selectedPlatform != "windows-psh" &&
|
|
- this.selectedPlatform != "darwin"
|
|
+ this.selectedPlatform != "darwin" &&
|
|
+ this.selectedPlatform != "freebsd"
|
|
) {
|
|
toast("Please select a platform", false);
|
|
return;
|
|
@@ -435,8 +437,42 @@
|
|
this.humans[this.selectedHuman].task_cluster_interval +
|
|
" --extra " +
|
|
extra;
|
|
-
|
|
break;
|
|
+ case "freebsd":
|
|
+ this.commandBlock =
|
|
+ "curl -sk -o '" +
|
|
+ this.humans[this.selectedHuman].name +
|
|
+ ".tar.gz' -X POST -H 'file:" +
|
|
+ this.humans[this.selectedHuman].name +
|
|
+ ".tar.gz' " +
|
|
+ this.serverIp +
|
|
+ "/file/download 2>&1 && mkdir '" +
|
|
+ this.humans[this.selectedHuman].name +
|
|
+ "' && tar -C '" +
|
|
+ this.humans[this.selectedHuman].name +
|
|
+ "' -zxvf '" +
|
|
+ this.humans[this.selectedHuman].name +
|
|
+ ".tar.gz' " +
|
|
+ " && virtualenv -p python3.9 '" +
|
|
+ this.humans[this.selectedHuman].name +
|
|
+ "' && '" +
|
|
+ this.humans[this.selectedHuman].name +
|
|
+ "/bin/pip' install -r '" +
|
|
+ this.humans[this.selectedHuman].name +
|
|
+ "/requirements.txt' && '" +
|
|
+ this.humans[this.selectedHuman].name +
|
|
+ "/bin/python' '" +
|
|
+ this.humans[this.selectedHuman].name +
|
|
+ "/human.py' --clustersize " +
|
|
+ this.humans[this.selectedHuman].tasks_per_cluster +
|
|
+ " " +
|
|
+ "--taskinterval " +
|
|
+ this.humans[this.selectedHuman].task_interval +
|
|
+ " --taskgroupinterval " +
|
|
+ this.humans[this.selectedHuman].task_cluster_interval +
|
|
+ " --extra " +
|
|
+ extra;
|
|
+ break;
|
|
case "linux":
|
|
this.commandBlock =
|
|
"curl -sk -o '" +
|
|
@@ -514,6 +550,10 @@
|
|
extra.forEach((command) => {
|
|
switch (platform) {
|
|
case "darwin":
|
|
+ command = command.replace(/\\/g, "\\\\");
|
|
+ command = command.replace(/"/g, '\\"');
|
|
+ break;
|
|
+ case "freebsd":
|
|
command = command.replace(/\\/g, "\\\\");
|
|
command = command.replace(/"/g, '\\"');
|
|
break;
|