Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runner script from John #9

Open
lassik opened this issue May 19, 2020 · 0 comments
Open

Runner script from John #9

lassik opened this issue May 19, 2020 · 0 comments

Comments

@lassik
Copy link
Contributor

lassik commented May 19, 2020

Thanks for all your work and for the explanations. In (small) return, here's a dinky shell script based on the one I used when I (tried to) keep all the Schemes listed in ImplementationContrasts installed locally through many changes of machine. I have it installed as /usr/local/bin/schemers, but of course anywhere on your PATH will do.

When run without arguments, it lists all available "schemers" images in alphabetical order. When run with the name of a container, it runs that container interactively. When run with "-a", it runs all containers interactively, one by one. This makes it easy, given a snippet of Scheme, to test it on many implementations by pasting it into each REPL in turn.

#!/bin/sh
if [ -z "$1" ]; then
  docker search schemers | sed 1d | sort
elif [ "$1" = "-a" ]; then
  for s in $(docker search schemers | awk -F '[/ ]' '{print $2}'); do
    echo '========================================================'
    echo "                         $(echo $s | tr '[a-z]' '[A-Z]')"
    echo '========================================================'
    docker run -it schemers/$s
  done
else
  docker run -it schemers/$1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant