mirror of
https://github.com/systemd/systemd
synced 2024-10-14 20:17:52 +00:00
test: introduce inst_recursive() helper function
This commit is contained in:
parent
569c6fd1b7
commit
da0465dc95
|
@ -2630,6 +2630,20 @@ inst_any() {
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inst_recursive() {
|
||||||
|
local p item
|
||||||
|
|
||||||
|
for p in "$@"; do
|
||||||
|
while read -r item; do
|
||||||
|
if [[ -d "$item" ]]; then
|
||||||
|
inst_dir "$item"
|
||||||
|
elif [[ -f "$item" ]]; then
|
||||||
|
inst_simple "$item"
|
||||||
|
fi
|
||||||
|
done < <(find "$p" 2>/dev/null)
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
# image_install [-o ] <file> [<file> ... ]
|
# image_install [-o ] <file> [<file> ... ]
|
||||||
# Install <file> to the test image
|
# Install <file> to the test image
|
||||||
# -o optionally install the <file> and don't fail, if it is not there
|
# -o optionally install the <file> and don't fail, if it is not there
|
||||||
|
|
Loading…
Reference in a new issue