Skip to content

Commit cec5500

Browse files
authored
Merge pull request #352 from k-okada/fix_typo
fix command curl ... line for osx
2 parents a372704 + 4fe79a1 commit cec5500

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.travis.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ set -e
44
export DEBIAN_FRONTEND=noninteractive
55

66
function travis_time_start {
7-
TRAVIS_START_TIME=$(date +%s%N)
8-
TRAVIS_TIME_ID=$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 8 | head -n 1)
7+
TRAVIS_START_TIME=$(date +%s)
8+
TRAVIS_TIME_ID=$(cat /dev/urandom | LC_ALL=C LC_CTYPE=C tr -dc 'a-z0-9' | fold -w 8 | head -n 1)
99
TRAVIS_FOLD_NAME=$1
10-
echo -e "\e[0Ktraivs_fold:start:$TRAVIS_FOLD_NAME"
11-
echo -e "\e[0Ktraivs_time:start:$TRAVIS_TIME_ID"
10+
echo -e "\e[0Ktravis_fold:start:$TRAVIS_FOLD_NAME"
11+
echo -e "\e[0Ktravis_time:start:$TRAVIS_TIME_ID"
1212
set -x # enable debug information
1313
}
1414
function travis_time_end {
1515
set +x # disable debug information
1616
_COLOR=${1:-32}
17-
TRAVIS_END_TIME=$(date +%s%N)
17+
TRAVIS_END_TIME=$(date +%s)
1818
TIME_ELAPSED_SECONDS=$(( ($TRAVIS_END_TIME - $TRAVIS_START_TIME)/1000000000 ))
19-
echo -e "traivs_time:end:$TRAVIS_TIME_ID:start=$TRAVIS_START_TIME,finish=$TRAVIS_END_TIME,duration=$(($TRAVIS_END_TIME - $TRAVIS_START_TIME))\n\e[0K"
20-
echo -e "traivs_fold:end:$TRAVIS_FOLD_NAME"
19+
echo -e "travis_time:end:$TRAVIS_TIME_ID:start=$TRAVIS_START_TIME,finish=$TRAVIS_END_TIME,duration=$(($TRAVIS_END_TIME - $TRAVIS_START_TIME))\n\e[0K"
20+
echo -e "travis_fold:end:$TRAVIS_FOLD_NAME"
2121
echo -e "\e[0K\e[${_COLOR}mFunction $TRAVIS_FOLD_NAME takes $(( $TIME_ELAPSED_SECONDS / 60 )) min $(( $TIME_ELAPSED_SECONDS % 60 )) sec\e[0m"
2222
}
2323

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ before_install: # Use this to prepare the system to install prerequisites or dep
8686
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
8787
# use stable rvm to avoid "shell_session_update: command not found" error on OSX.
8888
# https://github.com/travis-ci/travis-ci/issues/6307
89-
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; command curl -sSL https://rvm.io/mpapis.asc | gpg --import -; then rvm get stable; fi
89+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then set -x; gpg --version; gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB || command curl -sSL https://rvm.io/mpapis.asc | gpg --import -; rvm get stable; set +x; fi
9090
# Define some config vars
9191
install:
9292
- export CI_SOURCE_PATH=$(pwd)

0 commit comments

Comments
 (0)