Yes, this is a useful reminder and thank you Sean for the illustrative code snippets.
Squeak scripts in a workspace may be used to create bash scripts! For example also do create a Makefile be used to build a web app. ( http://www.olioapps.com/blog/the-lost-art-of-the-makefile/ )
The Unix commands may be stored as strings in class methods and manipulated / classified in a user friendly way with the browsers.
Then they are combined into a comprehensive bash script.
On 3/9/18, Sean P. DeNigris sean@clipperadams.com wrote:
Frank Shearar-3 wrote
I don't see how… Squeak could save you from that
install: packageCollection | cmdTemplate sortedPackages packageLines command comment | comment := '- Main reference: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#ru...
- We chose to omit `--no-install-recommends` because the (small?) size
difference didn''t seem to be worth the potential problems (see https://askubuntu.com/questions/65081/what-are-the-implications-of-no-instal...)
- `-y` isn''t needed because it is implied in `-qq` (see
https://askubuntu.com/questions/258219/how-do-i-make-apt-get-install-less-no...).'.
cmdTemplate := 'apt-get -qq update && apt-get -qq install \ {packages} && rm -rf /var/lib/apt/lists/*'.
"Sort per https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#so..." sortedPackages := packageCollection sort.
packageLines := String streamContents: [ :s | sortedPackages do: [ :e | s nextPutAll: e; nextPutAll: ' ' ] separatedBy: [ s lf; space; space; space; space ] ]. command := cmdTemplate format: { #packages -> packageLines } asDictionary. ^ self new command: command; comment: comment; yourself
You could say I just kicked the can down the road because the alphabetization problem still exists inside Smalltalk, but since it's turtles all the way down, if it really bothered me I could hack together a little GUI to edit the list!
Cheers, Sean -- Sent from: http://forum.world.st/Squeak-Dev-f45488.html