Skip to content

Instantly share code, notes, and snippets.

@cryptorick
Created March 26, 2015 20:16
Show Gist options
  • Save cryptorick/b41cdadaecea5c1610ac to your computer and use it in GitHub Desktop.
Save cryptorick/b41cdadaecea5c1610ac to your computer and use it in GitHub Desktop.
Changes to `ersatz/pil` for Cygwin/WIndows.
#!/bin/sh
# 29nov10abu
# Values for the civilized world.
_here="${0%/*}"
_cpsep=":"
# Values for the barbarian world.
#
# If on Windows (Cygwin, really), you're probably using a Windows
# native `java` which has `;` for the path separator. Why? Because
# Windows has to be different / keep to the old CP/M way (?). Also,
# convert file paths to native Windows (cygpath).
if [ "$(uname -o)" == "Cygwin" ]; then
_here="$(cygpath -m "${_here}")"
_cpsep=";"
fi
# Build the CLASSPATH ("cp") here. It looks uglier than before but it
# should work on all systems, civilized and barbarian.
_cp=".${_cpsep}tmp${_cpsep}${_here}/picolisp.jar"
# Run Ersatz PicoLisp
exec java -DPID=$$ -cp ${_cp} PicoLisp ${_here}/lib.l "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment