Adding helper methods for package management.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2024-09-01 11:36:54 -05:00
parent 25b91645e3
commit bbd924b079
2 changed files with 27 additions and 0 deletions

View File

@ -4,6 +4,14 @@ Class {
#category : #ExoRepo #category : #ExoRepo
} }
{ #category : #accessing }
Brew class >> help [
^ (GtSubprocessWithInMemoryOutput new
shellCommand: 'brew help';
runAndWait;
stdout)
]
{ #category : #accessing } { #category : #accessing }
Brew class >> install [ Brew class >> install [
"This is a preliminary starting installation script that is not working. "This is a preliminary starting installation script that is not working.
@ -24,3 +32,17 @@ Smalltalk os isWindows ifTrue: [ ^ nil ].
runAndWait; runAndWait;
stdout) stdout)
] ]
{ #category : #accessing }
Brew class >> isInstalled [
^ self help isEmptyOrNil not.
]
{ #category : #accessing }
Brew >> install: packageName [
^ GtSubprocessWithInMemoryOutput new
shellCommand: 'brew install ', packageName;
runAndWait;
stdout
]

View File

@ -59,6 +59,11 @@ Nimble class >> installed [
stdout) lines stdout) lines
] ]
{ #category : #accessing }
Nimble class >> isInstalled [
^ self version isEmptyOrNil not
]
{ #category : #accessing } { #category : #accessing }
Nimble class >> version [ Nimble class >> version [