Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xle-docker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tutoren
Formale Syntax
xle-docker
Commits
d9bdc734
Commit
d9bdc734
authored
3 years ago
by
Jakob Moser
Browse files
Options
Downloads
Patches
Plain Diff
Add entrypoint to run within Docker
parent
0879448f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
entrypoint.sh
+24
-0
24 additions, 0 deletions
entrypoint.sh
with
24 additions
and
0 deletions
entrypoint.sh
0 → 100644
+
24
−
0
View file @
d9bdc734
#!/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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment