Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fengzch-das
multibuild
Commits
bf2cfdd6
Commit
bf2cfdd6
authored
Aug 30, 2020
by
robbuckley
Browse files
catch curl errors and exit early
parent
444a6e5f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
osx_utils.sh
osx_utils.sh
+8
-1
tests/test_multibuild.sh
tests/test_multibuild.sh
+6
-0
No files found.
osx_utils.sh
View file @
bf2cfdd6
...
...
@@ -290,8 +290,15 @@ function install_mac_cpython {
local
py_stripped
=
$(
strip_ver_suffix
$py_version
)
local
py_inst
=
$(
pyinst_fname_for_version
$py_version
$py_osx_ver
)
local
inst_path
=
$DOWNLOADS_SDIR
/
$py_inst
local
retval
=
""
mkdir
-p
$DOWNLOADS_SDIR
curl
$MACPYTHON_URL
/
$py_stripped
/
${
py_inst
}
>
$inst_path
# exit early on curl errors, but dont let it exit the shell
cmd_notexit curl
-f
$MACPYTHON_URL
/
$py_stripped
/
${
py_inst
}
>
$inst_path
||
retval
=
$?
if
[
${
retval
:-
0
}
-ne
0
]
;
then
echo
"Python download failed! Check
${
py_inst
}
exists on the server."
exit
$retval
fi
if
[
"
${
py_inst
:
-3
}
"
==
"dmg"
]
;
then
hdiutil attach
$inst_path
-mountpoint
/Volumes/Python
inst_path
=
/Volumes/Python/Python.mpkg
...
...
tests/test_multibuild.sh
View file @
bf2cfdd6
...
...
@@ -21,7 +21,13 @@ if [ -n "$IS_MACOS" ]; then
MB_PYTHON_OSX_VER
=
${
MB_PYTHON_OSX_VER
:-
$(
macpython_sdk_for_version
$MB_PYTHON_VERSION
)
}
PLAT
=
${
PLAT
:-
$(
macpython_arch_for_version
$MB_PYTHON_VERSION
)
}
# exit early if this cmd is expected to fail (and does)
if
[[
-n
$OSX_ENV_EXPECT_FAIL
]]
;
then
expect_return 22 get_macpython_environment
$MB_PYTHON_VERSION
${
VENV
:-
""
}
$MB_PYTHON_OSX_VER
exit
0
fi
get_macpython_environment
$MB_PYTHON_VERSION
${
VENV
:-
""
}
$MB_PYTHON_OSX_VER
source
tests/test_python_install.sh
source
tests/test_fill_pyver.sh
source
tests/test_fill_pypy_ver.sh
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment