Skip to content

Commit

Permalink
feat(dracut-init.sh): add inst_libdir_dir() helper
Browse files Browse the repository at this point in the history
This helper function is similar to inst_libdir_file(), but it installs plain
directories located on a library directory instead of files.
  • Loading branch information
aafeijoo-suse authored and LaszloGombos committed Oct 22, 2022
1 parent f82edfe commit cc66925
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions dracut-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,22 @@ inst_any() {
return 1
}

# inst_libdir_dir <dir> [<dir>...]
# Install a <dir> located on a lib directory to the initramfs image
inst_libdir_dir() {
local -a _dirs
for _dir in $libdirs; do
for _i in "$@"; do
for _d in "$dracutsysrootdir$_dir"/$_i; do
[[ -d $_d ]] && _dirs+=("${_d#"$dracutsysrootdir"}")
done
done
done
for _dir in "${_dirs[@]}"; do
inst_dir "$_dir"
done
}

# inst_libdir_file [-n <pattern>] <file> [<file>...]
# Install a <file> located on a lib directory to the initramfs image
# -n <pattern> install matching files
Expand Down

0 comments on commit cc66925

Please sign in to comment.