diff options
author | Aaron Griffin <aaron@archlinux.org> | 2006-06-16 20:25:04 +0200 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2006-06-16 20:25:04 +0200 |
commit | 21e5a68129b389f03ac07282a494ffe2b298f032 (patch) | |
tree | 98329b74a35ab473f63f993a02ed8e802a45b59d | |
parent | f915839219cadde8cba5e286df51a6a8de404149 (diff) | |
download | mkinitcpio-21e5a68129b389f03ac07282a494ffe2b298f032.tar.gz mkinitcpio-21e5a68129b389f03ac07282a494ffe2b298f032.tar.xz |
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
-rw-r--r-- | functions | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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 |