Skip to content

Instantly share code, notes, and snippets.

@peteruhnak
Created February 12, 2016 23:11
Show Gist options
  • Save peteruhnak/142a6b30494354df21d8 to your computer and use it in GitHub Desktop.
Save peteruhnak/142a6b30494354df21d8 to your computer and use it in GitHub Desktop.
pharo-scripting
#!/bin/sh
# place me in $PATH
set -e
if [ -z "$1" ]; then
echo "Missing script file"
exit 1
fi
readonly PROGDIR=$(readlink -m $(dirname $0))
readonly SCRIPT=$(readlink -f $1)
# change as needed
readonly VM="pharo-vm"
readonly IMAGE="$PROGDIR/pharo-sh/latest.image"
$VM --nodisplay $IMAGE st --quit $SCRIPT
#!/usr/bin/env psh
Transcript logCr: Smalltalk image imageFormatVersion.
@peteruhnak
Copy link
Author

$ ./test.st

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment