summaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-04-25 23:57:18 +0200
committerAaron Griffin <aaron@archlinux.org>2006-04-25 23:57:18 +0200
commit0958c0bcbad1a9db223225b9e69247e6b9c7a80c (patch)
tree26d95d47e67bf5e71dfce99c3b95597d1a3b9bed /functions
parent3f006aabbbef45df73071df0a558655bc8d23699 (diff)
downloadmkinitcpio-0958c0bcbad1a9db223225b9e69247e6b9c7a80c.tar.gz
mkinitcpio-0958c0bcbad1a9db223225b9e69247e6b9c7a80c.tar.xz
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@14 880c04e9-e011-0410-abf7-b926e227c9cd
Diffstat (limited to 'functions')
-rw-r--r--functions10
1 files changed, 5 insertions, 5 deletions
diff --git a/functions b/functions
index e424b1c..7a02c6e 100644
--- a/functions
+++ b/functions
@@ -18,12 +18,12 @@ err() { echo "ERROR: ${@}" >&2; }
add_dir()
{
local dir
- dir="$(dirname ${1})"
- if [ "x${dir}" != "x" -a "${dir}" != "/" ]; then
- dir="${dir}" #this got stripped off above... put it back
+ if [ "x${1}" != "x" -a "${1}" != "/" ]; then
+ dir="$(dirname ${1})"
+ [ "${dir}" = "/" ] && dir="${1}"
if ! grep "dir ${dir} " "${FILELIST}" 2>&1 > /dev/null; then
- add_dir "${dir}"
+ add_dir $(dirname "${dir}")
msg " adding dir ${dir}"
echo "dir ${dir} 755 0 0" >> "${FILELIST}"
fi
@@ -171,7 +171,7 @@ parse_hook()
done
if [ "x${SCRIPT}" != "x" ]; then
- add_file "${HOOKDIR}/${SCRIPT}"
+ add_file "${HOOKDIR}/${SCRIPT}" "/hooks/${SCRIPT}"
fi
}
# vim: set ft=sh ts=4 sw=4 noet: