Skip to content

Instantly share code, notes, and snippets.

@m2ym
Created March 7, 2011 08:48
Show Gist options
  • Save m2ym/858238 to your computer and use it in GitHub Desktop.
Save m2ym/858238 to your computer and use it in GitHub Desktop.
A wrapper shell script for Clozure CL
#!/bin/bash
CCL_HOME="$HOME/opt/ccl"
OS="$(uname -s)"
MARCH="$(uname -m)"
if [ "$OS" = Linux ]; then
if [ "$MARCH" = x86_64 ]; then
bin=lx86cl64
else
bin=lx86cl
fi
elif [ "$OS" = Darwin ]; then
if [ "$MARCH" = x86_64 ]; then
bin=dx86cl64
else
bin=dx86cl
fi
fi
if [ -z "$bin" ]; then
echo "$0: $OS $MARCH is unknown"
exit 1
fi
if which rlwrap > /dev/null; then
exec rlwrap "$CCL_HOME/$bin" "$@"
else
exec "$CCL_HOME/$bin" "$@"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment