diff options
author | Aaron Griffin <aaron@archlinux.org> | 2006-09-11 08:35:02 +0200 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2006-09-11 08:35:02 +0200 |
commit | cae4dcc74df336d0e14e3ef8de740ab7d3d0c275 (patch) | |
tree | ca6c668cb2f3d817905e00b0570bbd661ea78136 | |
parent | 6056127b65235ae43c2854057f6612ee38400300 (diff) | |
download | mkinitcpio-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-- | functions | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 |