(fwd) [Test-Runner Results] Squeak3.6beta latest update: #5411

Daniel Vainsencher danielv at netvision.net.il
Tue Sep 9 23:01:52 UTC 2003


Thanks, didn't know the version name was part of the updates.list. Is
that definitely linked to the ftp directory name?

My scsh script ended up looking like this -
***************
#!/usr/bin/scsh -s
!#

(define versionname 
	(string-drop 
		(last (filter (lambda (s) (string-prefix? "#" s)) 
			(run/strings (| 
				(curl -s "http://update.squeakfoundation.org/external/updates/updates.list")
				(tr "\r" "\n")))))
		7))

(define ftpdir 
	(string-append 
		"ftp://ftp.squeakfoundation.org/official-dist/" 
		versionname 
		"/"))

(define imagename
	(string-drop-right 
		(last (string-tokenize (last (run/strings (curl -s ,ftpdir))))) 
		4))

(run (wget ,(string-append ftpdir imagename ".zip")))

(run (unzip -o ,(string-append imagename ".zip")))

(run (squeak -memory 64M ,(string-append imagename ".image")
 runTests.st))
******************
where runTests.st is a short script that loads and runs Markus' code.

scsh is currently my favorite shell language (which isn't hard, I hate
most of them ;-).

Daniel

Ned Konz <ned at bike-nomad.com> wrote:
> On Tuesday 09 September 2003 12:21 pm, Daniel Vainsencher wrote:
> > * I don't know how to automate getting the image from the correct
> > most-bleeding-edge directory. I've hard coded 3.6beta for now and
> > will change it manually. Can we have a currentBleedingEdge symbolic
> > link in the ftp servers?
> 
> "Download the latest image if necessary; extract the zip to the 
> default directory."
> 
> list _ (HTTPClient httpGet: 
> 'http://update.squeakfoundation.org/external/updates/updates.list') 
> contents.
> versions _ (list findTokens: String crlf) select: [ :line | line 
> beginsWith: '#' ].
> bleedingEdge _ versions last copyFrom: 8 to: versions last size.
> ftpDirectory _ ServerDirectory on: 
> ('ftp://st.cs.uiuc.edu/pub/Smalltalk/Squeak/', bleedingEdge).
> latestImage _ (ftpDirectory getFileList contents findTokens: String 
> crlf) asSortedCollection last.
> (FileDirectory default fileExists: latestImage) ifFalse: [ | zipStream 
> client |
> 	zipStream _ FileDirectory default newFileNamed: latestImage.
> 	client _ ftpDirectory openFTPClient.
> 	client binary.
> 	client getFileNamed: latestImage into: zipStream.
> 	zipStream close.
> ].
> zip _ ZipArchive new readFrom: latestImage.
> zip members do: [ :m | zip extractMember: m ].
> 
> -- 
> Ned Konz
> http://bike-nomad.com
> GPG key ID: BEEA7EFE



More information about the Squeak-dev mailing list