Is there a simple way /automatic way to produce a sar from a
bunch of mcz files?
stéphane ducasse
ducasse at iam.unibe.ch
Thu Feb 3 07:44:50 UTC 2005
Thanks.
I will try to add that to MC because this would be a good way to
publish sar
On 2 févr. 05, at 22:39, Ned Konz wrote:
> Yes:
>
> sar := ZipArchive new.
> preamble := WriteStream on: String new.
> fileDir := FileDirectory default directoryNamed: 'package-cache'.
>
> { 'Package1'. 'Package2' } do: [ :packName |
> fileName := fileDir lastNameFor: packName extension: 'mcz'.
> sar
> addFile: (fileDir fullNameFor: fileName)
> as: fileName.
> preamble nextPutAll: 'self fileInMonticelloZipVersionNamed: ''';
> nextPutAll: fileName;
> nextPutAll: '''.';
> cr ].
>
> zip addMember: (ZipArchiveMember newFromString: preamble contents
> named:
> 'install/preamble').
>
> "then write it"
> zip writeTo: (FileDirectory default newFileNamed: 'test.sar').
>
> --
> Ned Konz
> http://bike-nomad.com/squeak/
>
More information about the Squeak-dev
mailing list
|