mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-30 22:11:59 -09:00
support/scripts: prepare for a more complex check for merged directories
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Romain Naour <romain.naour@smile.fr>
This commit is contained in:
committed by
Romain Naour
parent
4c57c030da
commit
9bc1453856
@@ -26,7 +26,7 @@ root="${1}"
|
||||
# each of them.
|
||||
#
|
||||
|
||||
test_merged() {
|
||||
is_valid_merged() {
|
||||
local root="${1}"
|
||||
local dir1="${2}"
|
||||
local dir2="${3}"
|
||||
@@ -35,9 +35,17 @@ test_merged() {
|
||||
inode1="$(stat -c '%i' "${root}${dir1}/." 2>/dev/null)"
|
||||
inode2="$(stat -c '%i' "${root}${dir2}/." 2>/dev/null)"
|
||||
|
||||
test -z "${inode1}" || \
|
||||
test "${inode1}" = "${inode2}" || \
|
||||
printf '%s\n' "${dir1}"
|
||||
test -z "${inode1}" || test "${inode1}" = "${inode2}"
|
||||
}
|
||||
|
||||
test_merged() {
|
||||
local root="${1}"
|
||||
local dir1="${2}"
|
||||
local dir2="${3}"
|
||||
|
||||
if ! is_valid_merged "${root}" "${dir1}" "${dir2}"; then
|
||||
printf '%s\n' "${dir1}"
|
||||
fi
|
||||
}
|
||||
|
||||
test_merged "${root}" "/lib" "/usr/lib"
|
||||
|
||||
Reference in New Issue
Block a user