Skip to content

Instantly share code, notes, and snippets.

@purplesyringa
Last active April 22, 2018 11:57
Show Gist options
  • Save purplesyringa/3a27a7516fc50b5b8b2595b8af2d571e to your computer and use it in GitHub Desktop.
Save purplesyringa/3a27a7516fc50b5b8b2595b8af2d571e to your computer and use it in GitHub Desktop.
PDP11/BK0010 compiler script
#!/usr/bin/env bash
cd "$(dirname "$0")"
echo Compiling $1
./compiler "$1" >_log
if [ $? -ne 0 ]; then
cat _log | python -c "import sys; print sys.stdin.read().decode('utf-8', 'ignore').encode('utf-8')" | tail -2 | head -1
exit
fi
echo Saved!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment