Compare commits

..

3 Commits

Author SHA1 Message Date
c838289aea Merge af9f4b2886 2022-07-25 18:54:48 -05:00
38b1196d3c Merge 2989ba0986 2022-07-25 18:42:35 -05:00
2ad5aace5a Creating NanoID generation. 2022-07-25 18:40:01 -05:00

View File

@ -23,6 +23,17 @@ NanoID class >> binaryFile [
^ FileLocator userData / 'Mutabit' / 'MiniDocs' / self scriptSourceCode basenameWithoutExtension ^ FileLocator userData / 'Mutabit' / 'MiniDocs' / self scriptSourceCode basenameWithoutExtension
] ]
{ #category : #accessing }
NanoID class >> generate [
OSSUnixSubprocess new
command: self binaryFile fullName;
redirectStdout;
redirectStdout;
"workingDirectory: self binaryFile parent;"
runAndWaitOnExitDo: [ :process :outString | ^ outString copyWithoutAll: (Character lf asString) ]
]
{ #category : #accessing } { #category : #accessing }
NanoID class >> install [ NanoID class >> install [
"For the moment, only Gnu/Linux and Mac are supported. "For the moment, only Gnu/Linux and Mac are supported.
@ -35,7 +46,6 @@ NanoID class >> install [
OSSUnixSubprocess new OSSUnixSubprocess new
command: 'nim'; command: 'nim';
arguments: {'c'. self scriptSourceCode fullName}; arguments: {'c'. self scriptSourceCode fullName};
"workingDirectory: binaryFileFolder;"
runAndWaitOnExitDo: [ :process :outString | runAndWaitOnExitDo: [ :process :outString |
(self scriptSourceCode parent / (self scriptSourceCode) basenameWithoutExtension) moveTo: binaryFileFolder asFileReference. (self scriptSourceCode parent / (self scriptSourceCode) basenameWithoutExtension) moveTo: binaryFileFolder asFileReference.
^ binaryFileFolder ] ^ binaryFileFolder ]