Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux Pacman Development (http://www.linux-archive.org/archlinux-pacman-development/)
-   -   makepkg: remove bash4 style output redirection (http://www.linux-archive.org/archlinux-pacman-development/388486-makepkg-remove-bash4-style-output-redirection.html)

Allan McRae 06-20-2010 03:21 PM

makepkg: remove bash4 style output redirection
 
convert bash-4 "&>" style redirection to "2>&1" to maintain
compatibility with bash-3.2

Signed-off-by: Allan McRae <allan@archlinux.org>
---
scripts/makepkg.sh.in | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 126c5f5..8e2a523 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -370,7 +370,7 @@ download_file() {
run_pacman() {
local ret=0
if (( ! ASROOT )) && [[ $1 != "-T" && $1 != "-Qq" ]]; then
- if [ "$(type -p sudo)" ] && sudo -l $PACMAN &>/dev/null; then
+ if [ "$(type -p sudo)" ] && sudo -l $PACMAN >/dev/null 2>&1; then
sudo $PACMAN $PACMAN_OPTS "$@" || ret=$?
else
su -c "$PACMAN $PACMAN_OPTS $*" || ret=$?
@@ -421,7 +421,7 @@ handle_deps() {
# avoid triggering the ERR trap
local restoretrap=$(trap -p ERR)
trap - ERR
- source /etc/profile &>/dev/null
+ source /etc/profile >/dev/null 2>&1
eval $restoretrap

return $R_DEPS_SATISFIED
@@ -479,7 +479,7 @@ remove_deps() {
download_sources() {
msg "$(gettext "Retrieving Sources...")"

- pushd "$SRCDEST" &>/dev/null
+ pushd "$SRCDEST" >/dev/null 2>&1

local netfile
for netfile in "${source[@]}"; do
@@ -515,7 +515,7 @@ download_sources() {
ln -s "$SRCDEST/$file" "$srcdir/"
done

- popd &>/dev/null
+ popd >/dev/null 2>&1
}

get_integlist() {
@@ -976,7 +976,7 @@ check_package() {
done

# check for references to the build directory
- if grep -R "${srcdir}" "${pkgdir}" &>/dev/null; then
+ if grep -R "${srcdir}" "${pkgdir}" >/dev/null 2>&1; then
warning "$(gettext "Package contains reference to %s")" "$srcdir"
fi
}
--
1.7.1


All times are GMT. The time now is 09:53 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.