From: Mike Frysinger Date: Sun, 9 Oct 2011 18:43:11 +0000 (-0400) Subject: prepstrip: optimize chmod slightly X-Git-Tag: v2.2.0_alpha65~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8ebca724748c0c2046e3120b0f5a813fc4298671;p=portage.git prepstrip: optimize chmod slightly Signed-off-by: Mike Frysinger --- diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip index d25259dca..5f0fe18fe 100755 --- a/bin/ebuild-helpers/prepstrip +++ b/bin/ebuild-helpers/prepstrip @@ -73,9 +73,9 @@ save_elf_debug() { eval $inode=\$x ${OBJCOPY} --only-keep-debug "${x}" "${y}" ${OBJCOPY} --add-gnu-debuglink="${y}" "${x}" - [[ -g ${x} ]] && chmod go-r "${y}" - [[ -u ${x} ]] && chmod go-r "${y}" - chmod a-x,o-w "${y}" + local args="a-x,o-w" + [[ -g ${x} || -u ${x} ]] && args+=",go-r" + chmod ${args} "${y}" fi if [[ -n ${buildid} ]] ; then