Skip to content

Commit

Permalink
Add obvious echo statements and install jq package and logic for upda…
Browse files Browse the repository at this point in the history
…ting rows (not completed)
  • Loading branch information
SYU15 committed May 25, 2016
1 parent 879cc9d commit 6b432c5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions .ebextensions/mysqlinstall.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
packages:
yum:
mysql: []
jq: []
1 change: 1 addition & 0 deletions init.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
echo "******************init is running********************"
$MYSQL_COMMAND -h $ELECTIONS_DB_HOST --port=$ELECTIONS_DB_PORT --user=$ELECTIONS_DB_USER --password=$ELECTIONS_DB_PASS << EOF
CREATE DATABASE IF NOT EXISTS election2016;
USE election2016;
Expand Down
1 change: 1 addition & 0 deletions results.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/sh

function get_ap_results {
echo "******************results is running********************"
#IFS (internal field separator) is reset
IFS=
declare -a urls=('http://api.ap.org/v2/elections/2012-11-06?apiKey='$AP_API_KEY'&statePostal=CA&officeID=P&format=json' 'http://api.ap.org/v2/elections/2012-11-06?apiKey='$AP_API_KEY'&statePostal=CA&officeID=Z&seatNum=3,9,11,15&format=json' 'http://api.ap.org/v2/elections/2012-11-06?apiKey='$AP_API_KEY'&statePostal=CA&officeID=Y&seatNum=4,14,16,24,27&format=json' 'http://api.ap.org/v2/elections/2012-11-06?apiKey='$AP_API_KEY'&statePostal=CA&officeID=H&seatNum=17&format=json' 'http://api.ap.org/v2/elections/2012-11-06?apiKey='$AP_API_KEY'&statePostal=CA&officeID=S&format=json')
Expand Down

0 comments on commit 6b432c5

Please sign in to comment.