mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-31 14:37:59 +00:00
scripts/unpack: minor cleanup
Eliminate use of cat and subshells in patching. The previous code takes the first field of PKG_BUILD, using a space as the delimiter. PKG_BUILD used to be generated using 'ls' at least as of before commit ef8e871d3c1234d2c2a8c2f0d9b2ba822a2ec50e in 2013. Today, PKG_BUILD is a set path, without spaces. Signed-off-by: Ian Leonard <antonlacon@gmail.com>
This commit is contained in:
parent
279d726b9f
commit
9326345a6e
@ -191,9 +191,9 @@ if [ -d "${SOURCES}/${PKG_NAME}" -o -d "${PKG_DIR}/sources" ] || pkg_call_exists
|
||||
if [ -f "${i}" ]; then
|
||||
build_msg "CLR_APPLY_PATCH" "APPLY PATCH $(print_color "CLR_PATCH_DESC" "${PATCH_DESC}")" "${i#${ROOT}/}"
|
||||
if grep -qE '^GIT binary patch$|^rename from|^rename to' ${i}; then
|
||||
cat ${i} | git apply --directory=$(echo "${PKG_BUILD}" | cut -f1 -d\ ) -p1 --verbose --whitespace=nowarn --unsafe-paths >&${VERBOSE_OUT}
|
||||
git apply --directory="${PKG_BUILD}" -p1 --verbose --whitespace=nowarn --unsafe-paths < ${i} >&${VERBOSE_OUT}
|
||||
else
|
||||
cat ${i} | patch -d $(echo "${PKG_BUILD}" | cut -f1 -d\ ) -p1 >&${VERBOSE_OUT}
|
||||
patch -d "${PKG_BUILD}" -p1 < ${i} >&${VERBOSE_OUT}
|
||||
fi
|
||||
fi
|
||||
done
|
||||
@ -201,7 +201,7 @@ if [ -d "${SOURCES}/${PKG_NAME}" -o -d "${PKG_DIR}/sources" ] || pkg_call_exists
|
||||
pkg_call_exists_opt post_patch && pkg_call
|
||||
fi
|
||||
|
||||
if [ ! "${PKG_NAME}" = "configtools" ] ; then
|
||||
if [ "${PKG_NAME}" != "configtools" ] ; then
|
||||
for config in $(find "${PKG_BUILD}" -name config.guess | sed 's/config.guess//'); do
|
||||
build_msg "CLR_FIXCONFIG" "FIXCONFIG" "${config}"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user