summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-09-11 08:35:02 +0200
committerAaron Griffin <aaron@archlinux.org>2006-09-11 08:35:02 +0200
commitcae4dcc74df336d0e14e3ef8de740ab7d3d0c275 (patch)
treeca6c668cb2f3d817905e00b0570bbd661ea78136
parent6056127b65235ae43c2854057f6612ee38400300 (diff)
downloadmkinitcpio-cae4dcc74df336d0e14e3ef8de740ab7d3d0c275.tar.gz
mkinitcpio-cae4dcc74df336d0e14e3ef8de740ab7d3d0c275.tar.xz
Minor fixes from bug #5245
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@166 880c04e9-e011-0410-abf7-b926e227c9cd
-rw-r--r--functions7
1 files changed, 4 insertions, 3 deletions
diff --git a/functions b/functions
index 086e707..58ee03d 100644
--- a/functions
+++ b/functions
@@ -52,7 +52,8 @@ add_full_dir ()
add_dir ()
{
- if [ "x${1}" != "x" -a "${1}" != "/" ]; then
+ #skip root directory and "." for relative directories... i.e. /foo/bar/./blah
+ if [ "x${1}" != "x" -a "${1}" != "/" -a "${1}" != "." ]; then
if ! grep "dir ${1} " "${FILELIST}" 2>&1 > /dev/null; then
add_dir $(dirname "${1}")
msg " adding dir ${1}"
@@ -82,13 +83,13 @@ add_symlink ()
{
local fil dest dir
if [ -L ${1} ]; then
- fil="${1}"
+ fil="${1##$BASEDIR}"
dest="${2##$BASEDIR}"
add_dir $(dirname "${dest}")
add_dir $(dirname "${fil}")
if ! grep "slink ${dest} " "${FILELIST}" 2>&1 > /dev/null; then
msg " adding link ${fil} -> ${dest}"
- echo "slink ${fil} ${dest} $(stat -c '%a' ${fil}) 0 0" >> "${FILELIST}"
+ echo "slink ${fil} ${dest} $(stat -c '%a' ${1}) 0 0" >> "${FILELIST}"
fi
fi
#fail quietly