summaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-06-16 20:25:04 +0200
committerAaron Griffin <aaron@archlinux.org>2006-06-16 20:25:04 +0200
commit21e5a68129b389f03ac07282a494ffe2b298f032 (patch)
tree98329b74a35ab473f63f993a02ed8e802a45b59d /functions
parentf915839219cadde8cba5e286df51a6a8de404149 (diff)
downloadmkinitcpio-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
Diffstat (limited to 'functions')
-rw-r--r--functions13
1 files changed, 13 insertions, 0 deletions
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