summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-04-06 17:09:13 +0000
committerZac Medico <zmedico@gentoo.org>2008-04-06 17:09:13 +0000
commit33e558be9ec5388b72a4eb5d4ec9b8f8598615af (patch)
tree8527c6b7f57b5578758a0d4f35a08bff133ea2b0
parent605d41153a999b6824f73083a323c4ba283307a9 (diff)
downloadportage-33e558be9ec5388b72a4eb5d4ec9b8f8598615af.tar.gz
portage-33e558be9ec5388b72a4eb5d4ec9b8f8598615af.tar.bz2
portage-33e558be9ec5388b72a4eb5d4ec9b8f8598615af.zip
* Use type -P which does not produce messages to stderr.
another option is to redirect both stderr and out. * Avoid &> replace with > ... 2>&1 Thanks to Alon Bar-Lev for this patch. svn path=/main/trunk/; revision=9727
-rwxr-xr-xbin/emerge-webrsync14
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index 0dd791f3a..8c0f7cd9e 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -28,7 +28,7 @@ wecho() { echo "${argv0}: warning: $*" 1>&2 ; }
eecho() { echo "${argv0}: error: $*" 1>&2 ; }
argv0=$0
-if ! type portageq > /dev/null ; then
+if ! type -P portageq > /dev/null ; then
eecho "could not find 'portageq'; aborting"
exit 1
fi
@@ -150,7 +150,7 @@ check_file_signature() {
vecho "Checking signature ..."
- if type -p gpg > /dev/null; then
+ if type -P gpg > /dev/null; then
gpg --homedir "${PORTAGE_GPG_DIR}" --verify "$signature" "$file" && r=0
else
eecho "cannot check signature: gpg binary not found"
@@ -174,7 +174,7 @@ sync_local() {
vecho "Syncing local tree ..."
# tarsync-0.2.1 doesn't seem to support lzma compression.
- if [ "${file##*.}" != "lzma" ] && type -P tarsync &> /dev/null; then
+ if [ "${file##*.}" != "lzma" ] && type -P tarsync > /dev/null; then
if ! tarsync $(vvecho -v) -s 1 -o portage -g portage -e /distfiles -e /packages -e /local "${file}" "${PORTDIR}"; then
eecho "tarsync failed; tarball is corrupt? (${file})"
return 1
@@ -189,7 +189,7 @@ sync_local() {
# Free disk space
rm -f "${file}"
- chown portage:portage portage &> /dev/null && \
+ chown portage:portage portage > /dev/null 2>&1 && \
chown -R portage:portage portage
cd portage
rsync -av --progress --stats --delete --delete-after \
@@ -221,9 +221,9 @@ do_snapshot() {
local mirror
local compressions=""
- type lzcat > /dev/null && compressions="${compressions} lzma"
- type bzcat > /dev/null && compressions="${compressions} bz2"
- type zcat > /dev/null && compressions="${compressions} gz"
+ type -P lzcat > /dev/null && compressions="${compressions} lzma"
+ type -P bzcat > /dev/null && compressions="${compressions} bz2"
+ type -P zcat > /dev/null && compressions="${compressions} gz"
if [[ -z ${compressions} ]] ; then
eecho "unable to locate any decompressors (lzcat or bzcat or zcat)"
exit 1