Replacing with GToolkit's OS process manager.
This commit is contained in:
parent
4fab465883
commit
b5f4602796
@ -302,10 +302,11 @@ TiddlyWiki >> exportJSONFileOptimized [
|
||||
exporter := wikiFolder / 'scripts' / 'exportJsonFile'.
|
||||
exporter exists ifFalse: [ self installJsonExporter ].
|
||||
|
||||
OSSUnixSubprocess new
|
||||
GtSubprocessWithInMemoryOutput new
|
||||
command: exporter fullName;
|
||||
workingDirectory: exporter parent fullName;
|
||||
runAndWaitOnExitDo: [ :process :outString | ^ self jsonFile ]
|
||||
runAndWait.
|
||||
^ self jsonFile
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
@ -540,22 +541,20 @@ TiddlyWiki >> importSTONFilesFrom: aFolder [
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> installJsonExporter [
|
||||
|
||||
| folder |
|
||||
folder := (self file parent / 'scripts') ensureCreateDirectory.
|
||||
| subfolder |
|
||||
subfolder := (self folder / 'scripts') ensureCreateDirectory.
|
||||
ZnClient new
|
||||
url: 'https://mutabit.com/repos.fossil/mutabit/uv/wiki/scripts/exportJsonFile';
|
||||
downloadTo: folder / 'exportJsonFile'.
|
||||
downloadTo: subfolder / 'exportJsonFile'.
|
||||
ZnClient new
|
||||
url: 'https://mutabit.com/repos.fossil/mutabit/doc/trunk/wiki/scripts/exportJsonFile.nim';
|
||||
downloadTo: folder / 'exportJsonFile.nim'.
|
||||
downloadTo: subfolder / 'exportJsonFile.nim'.
|
||||
|
||||
OSSUnixSubprocess new
|
||||
command: 'chmod';
|
||||
arguments: { '+x' . (folder / 'exportJsonFile') fullName };
|
||||
workingDirectory: folder fullName;
|
||||
redirectStdout;
|
||||
redirectStderr;
|
||||
runAndWaitOnExitDo: [ :process :outString | ^ outString ]
|
||||
^ GtSubprocessWithInMemoryOutput new
|
||||
command: 'chmod +x ' , ((subfolder / 'exportJsonFile') fullName);
|
||||
workingDirectory: subfolder fullName;
|
||||
runAndWait;
|
||||
stdout
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
|
Loading…
Reference in New Issue
Block a user