Skip to content

Commit

Permalink
Travis: Functions: double quote some and use dollar sign () since ba…
Browse files Browse the repository at this point in the history
…ckticks are deprecated. travis.yml: Now cat out selenium_log.txt separately for clarity.
  • Loading branch information
tchalvak committed Jun 4, 2014
1 parent c6a88e6 commit 13692f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,8 @@ after_install:

script: ./scripts/travis/test

#Just to limit noise in the test area, this is separated
after_script: cat selenium_log.txt

after_failure: ls && composer --version && vendor/bin/phpunit --version && php --version && sudo apache2ctl --version && sudo apache2ctl -S && sudo tail -10 /var/log/apache2/error.log
after_success: sudo apache2ctl -S && sudo tail -100 /var/log/apache2/error.log
6 changes: 3 additions & 3 deletions scripts/build/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ function ensure_selenium {
# Check java environment
say_info "Checking for Java..." "SELENIUM"

HAS_JAVA=$(file `which java javac` | grep /usr/bin/java: | awk '{split($0,array," ")} END{print array[1]}')
if [ "/usr/bin/java:" != $HAS_JAVA ]; then
HAS_JAVA=$(file $(which java javac) | grep /usr/bin/java: | awk '{split($0,array," ")} END{print array[1]}')
if [ "/usr/bin/java:" != "$HAS_JAVA" ]; then
say_warning "Java platform not found, installing..." "SELENIUM"
check_package openjdk-6-jre "SELENIUM"
check_package openjdk-6-jdk "SELENIUM"
Expand Down Expand Up @@ -142,7 +142,7 @@ function set_build {
function set_webserver {
say_info "Setting up web-server"
FULL_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # get current directory of the script, without trailing slash
DIR=`echo $FULL_SCRIPT_DIR | sed 's/scripts\/build//'` # remove /scripts/build/ to get the repo directory, has trailing slash.
DIR="$(echo $FULL_SCRIPT_DIR | sed 's/scripts\/build//')" # remove /scripts/build/ to get the repo directory, has trailing slash.
echo "FULL_SCRIPT_DIR is found to be:", $FULL_SCRIPT_DIR # e.g. /home/travis/BitLucid/ninjawars/scripts/build
echo "DIR is found to be:", $DIR # e.g. /home/travis/BitLucid/ninjawars/
echo "TRAVIS_BUILD_DIR is found to be:", $TRAVIS_BUILD_DIR #e.g. /home/travis/BitLucid/ninjawars
Expand Down

0 comments on commit 13692f8

Please sign in to comment.