[PATCH util-modular 02/10] release.sh: use the shorter &>/dev/null
Emil Velikov
emil.l.velikov at gmail.com
Fri Jul 1 14:44:43 UTC 2016
From: Emil Velikov <emil.velikov at collabora.com>
Requires Bash 4 or later.
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
Feel free to drop/nack this patch.
---
release.sh | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/release.sh b/release.sh
index 07ab473..e5f8573 100755
--- a/release.sh
+++ b/release.sh
@@ -15,7 +15,7 @@ export LC_ALL=C
#------------------------------------------------------------------------------
#
check_local_changes() {
- git diff --quiet HEAD > /dev/null 2>&1
+ git diff --quiet HEAD &>/dev/null
if [ $? -ne 0 ]; then
echo ""
echo "Uncommitted changes found. Did you forget to commit? Aborting."
@@ -430,10 +430,10 @@ process_module() {
fi
# Check that the top commit looks like a version bump
- git diff --unified=0 HEAD^ | $GREP -F $pkg_version >/dev/null 2>&1
+ git diff --unified=0 HEAD^ | $GREP -F $pkg_version &>/dev/null
if [ $? -ne 0 ]; then
# Wayland repos use m4_define([wayland_major_version], [0])
- git diff --unified=0 HEAD^ | $GREP -E "(major|minor|micro)_version" >/dev/null 2>&1
+ git diff --unified=0 HEAD^ | $GREP -E "(major|minor|micro)_version" &>/dev/null
if [ $? -ne 0 ]; then
echo "Error: the local top commit does not look like a version bump."
echo " the diff does not contain the string \"$pkg_version\"."
@@ -581,7 +581,7 @@ process_module() {
# srv_path="~/public_html$srv_path"
# Check that the server path actually does exist
- ssh $USER_NAME$hostname ls $srv_path >/dev/null 2>&1
+ ssh $USER_NAME$hostname ls $srv_path &>/dev/null
if [ $? -ne 0 ]; then
echo "Error: the path \"$srv_path\" on the web server does not exist."
cd $top_src
@@ -590,7 +590,7 @@ process_module() {
# Check for already existing tarballs
for tarball in $targz $tarbz2 $tarxz; do
- ssh $USER_NAME$hostname ls $srv_path/$tarball >/dev/null 2>&1
+ ssh $USER_NAME$hostname ls $srv_path/$tarball &>/dev/null
if [ $? -eq 0 ]; then
if [ "x$FORCE" = "xyes" ]; then
echo "Warning: overwriting released tarballs due to --force option."
--
2.8.2
More information about the xorg-devel
mailing list