From 21e5a68129b389f03ac07282a494ffe2b298f032 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Fri, 16 Jun 2006 18:25:04 +0000 Subject: add_full_dir to dump an entire dir into initramfs git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@130 880c04e9-e011-0410-abf7-b926e227c9cd --- functions | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/functions b/functions index d8f60b9..f57e22d 100644 --- a/functions +++ b/functions @@ -37,6 +37,19 @@ msg () { [ "${QUIET}" = "n" ] && echo "${@}"; } err () { echo "ERROR: ${@}" >&2; } die () { echo "FATAL: ${@}" >&2; exit 1; } +add_full_dir () +{ + if [ "x${1}" != "x" ]; then + for f in ${1}/*; do + if [ -d "${f}" ]; then + add_full_dir "${f}" + else + add_file "${f}" + fi + done + fi +} + add_dir () { if [ "x${1}" != "x" -a "${1}" != "/" ]; then -- cgit v1.2.3-24-g4f1b