pinokiod 3.2.53 → 3.2.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kernel/bin/brew.js +9 -4
- package/kernel/bin/xcode.sh +25 -0
- package/package.json +1 -1
package/kernel/bin/brew.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const path = require('path')
|
|
1
2
|
class Brew {
|
|
2
3
|
description = "Look for a dialog requesting the command line developer tools, and click 'Install'"
|
|
3
4
|
async install(req, ondata) {
|
|
@@ -18,14 +19,18 @@ class Brew {
|
|
|
18
19
|
await this.kernel.bin.rm("Homebrew.zip", ondata)
|
|
19
20
|
|
|
20
21
|
if (this.kernel.platform === "darwin") {
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
|
|
23
|
+
let sh_path = path.resolve(this.kernel.homedir, "xcode.sh")
|
|
24
|
+
let sh = await fs.promises.readFile("xcode.sh", "utf8")
|
|
25
|
+
console.log({ sh })
|
|
26
|
+
await fs.promises.writeFile(sh_path, sh)
|
|
27
|
+
await this.kernel.bin.exec({ message: "xcode.sh", path: this.kernel.homedir }, (stream) => { ondata(stream) })
|
|
23
28
|
|
|
24
29
|
ondata({ raw: "installing xcode-select. please approve the xcode-select install dialog and install before proceeding...\r\n" })
|
|
25
30
|
await this.kernel.bin.exec({ message: "xcode-select --install" }, (stream) => { ondata(stream) })
|
|
26
31
|
|
|
27
|
-
ondata({ raw: "Setting CommandLineTools path...\r\n" })
|
|
28
|
-
await this.kernel.bin.exec({ sudo: true, message: "xcode-select -switch /Library/Developer/CommandLineTools" }, (stream) => { ondata(stream) })
|
|
32
|
+
//ondata({ raw: "Setting CommandLineTools path...\r\n" })
|
|
33
|
+
//await this.kernel.bin.exec({ sudo: true, message: "xcode-select -switch /Library/Developer/CommandLineTools" }, (stream) => { ondata(stream) })
|
|
29
34
|
}
|
|
30
35
|
//
|
|
31
36
|
ondata({ raw: "installing gettext\r\n" })
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
sudo rm -rf /Library/Developer/CommandLineTools
|
|
3
|
+
|
|
4
|
+
# Trigger the installation
|
|
5
|
+
xcode-select --install
|
|
6
|
+
|
|
7
|
+
# Wait for the "Install Command Line Developer Tools" process to start
|
|
8
|
+
echo "Waiting for the installation dialog to be confirmed..."
|
|
9
|
+
while ! pgrep "Install Command Line Developer Tools" > /dev/null; do
|
|
10
|
+
sleep 1
|
|
11
|
+
done
|
|
12
|
+
|
|
13
|
+
echo "Installation in progress..."
|
|
14
|
+
|
|
15
|
+
# Wait for the installation process to finish
|
|
16
|
+
while pgrep "Install Command Line Developer Tools" > /dev/null; do
|
|
17
|
+
sleep 1
|
|
18
|
+
done
|
|
19
|
+
|
|
20
|
+
echo "Installation completed."
|
|
21
|
+
|
|
22
|
+
# Switch to the installed Command Line Tools path
|
|
23
|
+
xcode-select -switch /Library/Developer/CommandLineTools
|
|
24
|
+
|
|
25
|
+
echo "Switched to Command Line Tools."
|