mirror of
https://github.com/github/semantic.git
synced 2024-12-22 06:11:49 +03:00
Merge pull request #1736 from github/charliesome/fix-generate-example
Make script/generate-example more resilient around missing files
This commit is contained in:
commit
d45fafd5e2
@ -35,17 +35,23 @@ generate_example () {
|
||||
diffFileAB="${fileA%%.*}.diffA-B.txt"
|
||||
diffFileBA="${fileB%%.*}.diffB-A.txt"
|
||||
|
||||
status $parseFileA
|
||||
"$(dirname "$0")/run" semantic parse --sexpression $fileA > $parseFileA
|
||||
if [ -e "$fileA" ]; then
|
||||
status $parseFileA
|
||||
"$(dirname "$0")/run" semantic parse --sexpression $fileA > $parseFileA
|
||||
fi
|
||||
|
||||
status $parseFileB
|
||||
"$(dirname "$0")/run" semantic parse --sexpression $fileB > $parseFileB
|
||||
if [ -e "$fileB" ]; then
|
||||
status $parseFileB
|
||||
"$(dirname "$0")/run" semantic parse --sexpression $fileB > $parseFileB
|
||||
fi
|
||||
|
||||
status $diffFileAB
|
||||
"$(dirname "$0")/run" semantic diff --sexpression $fileA $fileB > $diffFileAB
|
||||
if [ -e "$fileA" -a -e "$fileB" ]; then
|
||||
status $diffFileAB
|
||||
"$(dirname "$0")/run" semantic diff --sexpression $fileA $fileB > $diffFileAB
|
||||
|
||||
status $diffFileBA
|
||||
"$(dirname "$0")/run" semantic diff --sexpression $fileB $fileA > $diffFileBA
|
||||
status $diffFileBA
|
||||
"$(dirname "$0")/run" semantic diff --sexpression $fileB $fileA > $diffFileBA
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ -d $1 ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user