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
|
@ -12,7 +12,7 @@ _add_trigger() {
|
|||
process_metadata_scripts() {
|
||||
local action="$1"
|
||||
local action_file="$2"
|
||||
local tmpf=$(mktemp || exit 1)
|
||||
local tmpf=$(mktemp) || exit 1
|
||||
local fpattern="s|${PKGDESTDIR}||g;s|^\./$||g;/^$/d"
|
||||
local targets= f= _f= info_files= home= shell= descr= groups=
|
||||
local found= triggers_found= _icondirs= _schemas= _mods= _tmpfiles=
|
||||
|
|
|
@ -61,7 +61,7 @@ hook() {
|
|||
return 0
|
||||
fi
|
||||
|
||||
depsftmp=$(mktemp || exit 1)
|
||||
depsftmp=$(mktemp) || exit 1
|
||||
find ${PKGDESTDIR} -type f -perm -u+w > $depsftmp 2>/dev/null
|
||||
|
||||
exec 3<&0 # save stdin
|
||||
|
|
|
@ -5,7 +5,7 @@ collect_sonames() {
|
|||
local _destdir="$1" f _soname _fname _pattern
|
||||
local _pattern="^[[:alnum:]]+(.*)+\.so(\.[0-9]+)*$"
|
||||
local _versioned_pattern="^[[:alnum:]]+(.*)+\.so(\.[0-9]+)+$"
|
||||
local _tmpfile="$(mktemp || exit 1)"
|
||||
local _tmpfile=$(mktemp) || exit 1
|
||||
|
||||
if [ ! -d ${_destdir} ]; then
|
||||
rm -f ${_tmpfile}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue