From 24ed0af7f5d979450bf444ad31c4d49727348be8 Mon Sep 17 00:00:00 2001 From: Offray Date: Sun, 28 Apr 2024 07:32:07 -0500 Subject: [PATCH] Starting implementation of Brew interface. --- src/ExoRepo/Brew.class.st | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/ExoRepo/Brew.class.st diff --git a/src/ExoRepo/Brew.class.st b/src/ExoRepo/Brew.class.st new file mode 100644 index 0000000..283906e --- /dev/null +++ b/src/ExoRepo/Brew.class.st @@ -0,0 +1,20 @@ +Class { + #name : #Brew, + #superclass : #Object, + #category : #ExoRepo +} + +{ #category : #accessing } +Brew class >> install [ + "This is a preliminary starting installation script that is not working. + Dependencies and sudo access are not managed here. + For example, doing 'sudo -S base-devel' on Arch based systems or + 'brew intall gcc' is yet not managed here." + Smalltalk os isWindows ifTrue: [ ^ nil ]. + OSSUnixSubprocess new + shellCommand: '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"'; + redirectStdout; + runAndWaitOnExitDo: [ :command :outString | + ^ outString + ]. +]