Skip to content

Commit 7f88db6

Browse files
author
Chris Park
committed
Update examples
- also fixed a couple of errors in the run-example script
1 parent 6822b91 commit 7f88db6

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

examples/docker/run-examples.sh

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,18 @@ err=0
6565
if [[ ${result} == *"${err}"* ]]; then
6666
retcode=1
6767
fi
68-
if [[ $result == *"["* ]]; then
69-
responseCount=`echo $result | jq 'del(.requestId) | .[] | length' | awk '{SUM += $1} END { print SUM }'`
70-
if [ $responseCount -eq 0 2>/dev/null]; then
71-
echo -e "\nEmpty response\n"
72-
exit 1
68+
if [[ $result == *"["* ]]; then
69+
responseCount=`echo $result | jq 'del(.requestId) | .[] | length' | awk '{SUM += $1} END { print SUM }'`
70+
if [ $responseCount -eq 0 2>/dev/null]; then
71+
echo -e "\nEmpty response\n"
72+
retcode=1
73+
fi
7374
fi
74-
fi
75-
chmod 0755 ../source/*.sh
76-
err=1
7775
if [[ $result == *"["* ]]; then
7876
responseCount=`echo $result | jq 'del(.requestId) | .[] | length' | awk '{SUM += $1} END { print SUM }'`
7977
if [ $responseCount -eq 0 2>/dev/null]; then
8078
echo -e "\nEmpty response\n"
81-
err=1
79+
retcode=1
8280
fi
8381
fi
8482
done
@@ -127,4 +125,3 @@ else
127125
fi
128126

129127
exit ${retcode}
130-
exit $err

examples/relationships.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ if [ $# -lt 1 ]; then
44
echo "usage: $0 api_key [alternate_url]"
55
exit 1
66
fi
7-
relationships_text_data="The Ghostbusters movie was filmed in Boston."
7+
relationships_text_data="Bill Gates, Microsoft"\'"s former CEO, is a philanthropist."
88

99
if [ -z "$2" ]; then
1010
url="https://api.rosette.com/rest/v1/relationships"

examples/syntax_dependencies.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ if [ $# -lt 1 ]; then
44
echo "usage: $0 api_key [alternate_url]"
55
exit 1
66
fi
7-
syntax_dependencies_data="Sony Pictures is planning to shoot a good portion of the new Ghostbusters in Boston as well."
7+
syntax_dependencies_data="Yoshinori Ohsumi, a Japanese cell biologist, was awarded the Nobel Prize in Physiology or Medicine on Monday."
88

99
if [ -z "$2" ]; then
1010
url="https://api.rosette.com/rest/v1/syntax/dependencies"

0 commit comments

Comments
 (0)