Skip to content

Commit b06cd67

Browse files
committed
Set RELEASE and OS_NAME correctly when lsb_release is unavailable
1 parent 76eb3bf commit b06cd67

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ install:
2424

2525
before_script:
2626
- 'export INSTALL_DEST=${INSTALL_DEST:-/opt/python}'
27-
- 'export LSB_RELEASE=${LSB_RELEASE:-$(lsb_release -rs || echo ${$(sw_vers -productVersion)%*.*})}'
28-
- 'export OS_NAME=${OS_NAME:-$(lsb_release -is | tr "A-Z" "a-z" || "osx")}'
27+
- export LSB_RELEASE=$(lsb_release -rs 2>/dev/null || sw_vers -productVersion | sed 's/^\([0-9][0-9]*.[0-9][0-9]*\).*/\1/')'
28+
- 'export OS_NAME=${OS_NAME:-$((lsb_release -is || echo "osx") | tr "A-Z" "a-z")}'
2929
- 'export ARCH=${ARCH:-$(uname -m)}'
3030
- 'export PACKAGES=${PACKAGES:-pip numpy nose pytest mock wheel}'
3131

0 commit comments

Comments
 (0)