From 95274e1b5d5826d0248b1053388592cec744864e Mon Sep 17 00:00:00 2001 From: triallax Date: Mon, 26 Jun 2023 11:51:57 +0100 Subject: Clean up shell redirects Some of these are outright wrong (e.g. `echo foo 2>&1`), others are just more verbose than they need to be. Closes: #304 [via git-merge-pr] --- xlocate | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'xlocate') diff --git a/xlocate b/xlocate index e58fee8..4909d00 100755 --- a/xlocate +++ b/xlocate @@ -17,7 +17,7 @@ if command -v git >/dev/null 2>&1; then elif command -v chroot-git >/dev/null 2>&1; then GIT_CMD=$(command -v chroot-git) else - echo "xlocate: git command not found." 1>&2 + echo "xlocate: git command not found." >&2 exit 1 fi @@ -76,7 +76,7 @@ case "$1" in xsyncgit exit $?;; '') - echo "Usage: xlocate [-g | -S | PATTERN]" 1>&2 + echo "Usage: xlocate [-g | -S | PATTERN]" >&2 exit 1;; esac @@ -88,14 +88,14 @@ if [ -d "$XLOCATE_GIT" ]; then fi if [ -z "$BASE" ] || find /var/db/xbps/ -name '*repodata' -newer "$BASE" | grep -q .; then if grep -q origin "$XLOCATE_GIT/config"; then - echo "xlocate: database outdated, please run xlocate -S." 1>&2 + echo "xlocate: database outdated, please run xlocate -S." >&2 else - echo "xlocate: database outdated, please run xlocate -g." 1>&2 + echo "xlocate: database outdated, please run xlocate -g." >&2 fi fi $GIT_CMD -c grep.lineNumber=false -c grep.column=false --git-dir="$XLOCATE_GIT" grep -- "$@" @ | sed 's/^@://' | $COLUMN | grep . else - echo "xlocate: database not found, please use xlocate -S." 1>&2 + echo "xlocate: database not found, please use xlocate -S." >&2 exit 1 fi -- cgit 1.4.1