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"
|
diffFileAB="${fileA%%.*}.diffA-B.txt"
|
||||||
diffFileBA="${fileB%%.*}.diffB-A.txt"
|
diffFileBA="${fileB%%.*}.diffB-A.txt"
|
||||||
|
|
||||||
status $parseFileA
|
if [ -e "$fileA" ]; then
|
||||||
"$(dirname "$0")/run" semantic parse --sexpression $fileA > $parseFileA
|
status $parseFileA
|
||||||
|
"$(dirname "$0")/run" semantic parse --sexpression $fileA > $parseFileA
|
||||||
|
fi
|
||||||
|
|
||||||
status $parseFileB
|
if [ -e "$fileB" ]; then
|
||||||
"$(dirname "$0")/run" semantic parse --sexpression $fileB > $parseFileB
|
status $parseFileB
|
||||||
|
"$(dirname "$0")/run" semantic parse --sexpression $fileB > $parseFileB
|
||||||
|
fi
|
||||||
|
|
||||||
status $diffFileAB
|
if [ -e "$fileA" -a -e "$fileB" ]; then
|
||||||
"$(dirname "$0")/run" semantic diff --sexpression $fileA $fileB > $diffFileAB
|
status $diffFileAB
|
||||||
|
"$(dirname "$0")/run" semantic diff --sexpression $fileA $fileB > $diffFileAB
|
||||||
|
|
||||||
status $diffFileBA
|
status $diffFileBA
|
||||||
"$(dirname "$0")/run" semantic diff --sexpression $fileB $fileA > $diffFileBA
|
"$(dirname "$0")/run" semantic diff --sexpression $fileB $fileA > $diffFileBA
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ -d $1 ]]; then
|
if [[ -d $1 ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user