-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into hp_printer_jarm
- Loading branch information
Showing
4 changed files
with
113 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
|
||
if [ $# -eq 0 ] | ||
then | ||
echo "Usage: $(basename $0) <xml fingerprint directory>" | ||
exit 1 | ||
fi | ||
|
||
if [ ! -d "$1" ] | ||
then | ||
echo "The XML fingerprint file directory must be supplied." | ||
exit 1 | ||
fi | ||
|
||
bin/recog_verify "$1/*.xml" | ||
|
||
if ! type fswatch &>/dev/null; | ||
then | ||
echo "'fswatch' is required to monitor fingerprint files for changes and update the editor." | ||
echo "See: https://emcrisostomo.github.io/fswatch/ or install with:" | ||
echo " MacOS Homebrew: brew install fswatch" | ||
echo " Ubuntu/Debian: apt install fswatch" | ||
echo | ||
echo "Otherwise, you can re-run this task using the Visual Studio Code command palette" | ||
exit 1 | ||
fi | ||
|
||
echo "Waiting for changes..." | ||
fswatch -0 $1 | while read -d "" event; do { | ||
echo "Changes detected, validating: ${event}" | ||
# TODO: VSCode doesn't support individual/incremental updates to files yet. | ||
bin/recog_verify "$1/*.xml" | ||
echo "Waiting for changes..." | ||
}; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Recog Verify - Background Monitor", | ||
"command": ".vscode/bin/monitor-recog-fingerprints.sh", | ||
"args": [ | ||
"${workspaceFolder}/xml" | ||
], | ||
"windows": { | ||
"command": "" | ||
}, | ||
"type": "process", | ||
"isBackground": true, | ||
"problemMatcher": { | ||
"owner": "recog", | ||
"fileLocation": [ | ||
"absolute" | ||
], | ||
"pattern": { | ||
"regexp": "^(.*):(\\d+):\\s+(WARN|FAIL):\\s+(.*)$", | ||
"file": 1, | ||
"severity": 3, | ||
"message": 4, | ||
"location": 2 | ||
}, | ||
"background": { | ||
"activeOnStart": true, | ||
"beginsPattern": "^Changes detected", | ||
"endsPattern": "^Waiting for changes" | ||
}, | ||
}, | ||
"presentation": { | ||
"reveal": "always", | ||
"revealProblems": "onProblem" | ||
}, | ||
"runOptions": { | ||
"runOn": "folderOpen" | ||
} | ||
}, | ||
{ | ||
"label": "Recog Verify", | ||
"command": "bin/recog_verify", | ||
"args": [ | ||
"${workspaceFolder}/xml/*.xml" | ||
], | ||
"windows": { | ||
"command": "" | ||
}, | ||
"type": "process", | ||
"problemMatcher": { | ||
"owner": "recog", | ||
"fileLocation": [ | ||
"absolute" | ||
], | ||
"pattern": { | ||
"regexp": "^(.*):(\\d+):\\s+(WARN|FAIL):\\s+(.*)$", | ||
"file": 1, | ||
"severity": 3, | ||
"message": 4, | ||
"location": 2 | ||
} | ||
}, | ||
"presentation": { | ||
"reveal": "always", | ||
"revealProblems": "onProblem" | ||
}, | ||
"runOptions": { | ||
"runOn": "folderOpen" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters