update patch

This commit is contained in:
Tobias Powalowski 2022-12-02 10:13:08 +01:00
parent 5bc606e76f
commit 272ca5b29b

View file

@ -646,7 +646,7 @@ add_file() {
command cp --preserve=mode,ownership --parents "$src" "$BUILDROOT"
else
# cp cannot handle mkdir :(
[[ -d $(dirname "$BUILDROOT$dest") ]] || mkdir -p $(dirname "$BUILDROOT$dest")
[[ -d "${BUILDROOT}${dest%/*}" ]] || add_dir "${dest%/*}"
command cp --preserve=mode,ownership "$src" "$BUILDROOT$dest"
fi
else
@ -711,7 +711,6 @@ add_binary() {
binary="$(realpath -s -- "$binary")"
dest=${2:-$binary}
dest="$(realpath -ms -- "$dest")"
mode=${3:-$mode}
add_file "$binary" "$dest" "$mode"