xbps-src: exit properly if mktemp(1) fails, not from its subshell.
Thanks @huglovefan
This commit is contained in:
parent
8614cca7df
commit
7b7d7c13a1
10 changed files with 12 additions and 12 deletions
|
@ -6,7 +6,7 @@ remove_pkg_cross_deps() {
|
|||
|
||||
cd $XBPS_MASTERDIR || return 1
|
||||
msg_normal "${pkgver:-xbps-src}: removing autocrossdeps, please wait...\n"
|
||||
tmplogf=$(mktemp || exit 1)
|
||||
tmplogf=$(mktemp) || exit 1
|
||||
|
||||
if [ -z "$XBPS_REMOVE_XCMD" ]; then
|
||||
source_file $XBPS_CROSSPFDIR/${XBPS_CROSS_BUILD}.sh
|
||||
|
@ -37,7 +37,7 @@ prepare_cross_sysroot() {
|
|||
[ $? -eq 0 ] && return 0
|
||||
|
||||
msg_normal "Installing $cross cross pkg: cross-vpkg-dummy ...\n"
|
||||
errlog=$(mktemp || exit 1)
|
||||
errlog=$(mktemp) || exit 1
|
||||
$XBPS_INSTALL_XCMD -Syfd cross-vpkg-dummy &>$errlog
|
||||
rval=$?
|
||||
if [ $rval -ne 0 -a $rval -ne 17 ]; then
|
||||
|
@ -71,7 +71,7 @@ install_cross_pkg() {
|
|||
check_installed_pkg cross-${XBPS_CROSS_TRIPLET}-0.1_1
|
||||
[ $? -eq 0 ] && return 0
|
||||
|
||||
errlog=$(mktemp || exit 1)
|
||||
errlog=$(mktemp) || exit 1
|
||||
msg_normal "Installing $cross cross compiler: cross-${XBPS_CROSS_TRIPLET} ...\n"
|
||||
$XBPS_INSTALL_CMD -Syfd cross-${XBPS_CROSS_TRIPLET} &>$errlog
|
||||
rval=$?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue