diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-12-29 10:28:25 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-12-30 22:16:57 -0800 |
commit | 2d36ccae3e834632a69d1f51e627722d7af0b16c (patch) | |
tree | c1b651a857c000be5263e8920b6b7cc2fba7b560 /bin/ebuild-helpers | |
parent | 1d941aed8d1fee3ae3592ada2f87b6b701d8de8c (diff) | |
download | portage-2d36ccae3e834632a69d1f51e627722d7af0b16c.tar.gz portage-2d36ccae3e834632a69d1f51e627722d7af0b16c.tar.bz2 portage-2d36ccae3e834632a69d1f51e627722d7af0b16c.zip |
bash: as a general rule, use read -r
This solves cases like bug #350045.
Diffstat (limited to 'bin/ebuild-helpers')
-rwxr-xr-x | bin/ebuild-helpers/ecompressdir | 4 | ||||
-rwxr-xr-x | bin/ebuild-helpers/prepallman | 2 | ||||
-rwxr-xr-x | bin/ebuild-helpers/prepinfo | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/bin/ebuild-helpers/ecompressdir b/bin/ebuild-helpers/ecompressdir index 7ed2627e3..7a95120a9 100755 --- a/bin/ebuild-helpers/ecompressdir +++ b/bin/ebuild-helpers/ecompressdir @@ -63,7 +63,7 @@ funk_up_dir() { ((ret|=$?)) find "${dir}" -type l -print0 | \ - while read -d $'\0' brokenlink ; do + while read -r -d $'\0' brokenlink ; do [[ -e ${brokenlink} ]] && continue olddest=$(readlink "${brokenlink}") [[ ${act} == "compress" ]] \ @@ -86,7 +86,7 @@ _relocate_skip_dirs() { [[ -d ${srctree} ]] || return 0 find "${srctree}" -name '*.ecompress.skip' -print0 | \ - while read -d $'\0' src ; do + while read -r -d $'\0' src ; do src=${src%.ecompress.skip} dst="${dsttree}${src#${srctree}}" parent=${dst%/*} diff --git a/bin/ebuild-helpers/prepallman b/bin/ebuild-helpers/prepallman index 4568bac1d..574ab6251 100755 --- a/bin/ebuild-helpers/prepallman +++ b/bin/ebuild-helpers/prepallman @@ -10,7 +10,7 @@ hasq "${EAPI}" 0 1 2 3 || exit 0 ret=0 find "${D}" -type d -name man > "${T}"/prepallman.filelist -while read mandir ; do +while read -r mandir ; do mandir=${mandir#${D}} prepman "${mandir%/man}" ((ret|=$?)) diff --git a/bin/ebuild-helpers/prepinfo b/bin/ebuild-helpers/prepinfo index cbbba3ed0..9552923a3 100755 --- a/bin/ebuild-helpers/prepinfo +++ b/bin/ebuild-helpers/prepinfo @@ -23,7 +23,7 @@ if [[ ! -d ${D}${infodir} ]] ; then fi fi -find "${D}${infodir}" -type d -print0 | while read -d $'\0' x ; do +find "${D}${infodir}" -type d -print0 | while read -r -d $'\0' x ; do for f in "${x}"/.keepinfodir*; do [[ -e ${f} ]] && continue 2 done |