Skip to content
Snippets Groups Projects
Commit d9bdc734 authored by Jakob Moser's avatar Jakob Moser
Browse files

Add entrypoint to run within Docker

parent 0879448f
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env bash
#
# Entrypoint for the xle Docker image.
#
# - /grammar.lfg contains the grammar
# - $1 contains the sentence to be parsed (passed as parameter)
# Write xlerc containing instructions to parse
echo "create-parser /grammar.lfg" > xlerc
echo "parse { $1 }" >> xlerc
# Start X server in background, wait to ensure it has started properly
Xvfb :123 &
sleep 1
# Configure apps to use this X server
export DISPLAY=:123
# Start XLE, this will automatically load xlerc, wait until it has started and the parse is completed
xle &
sleep 3
# Take a screenshot of the entire screen and store it
import -window root /output/screenshot.png
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment