about summary refs log tree commit diff
path: root/xlocate
diff options
context:
space:
mode:
authortriallax <triallax@tutanota.com>2023-06-26 11:51:57 +0100
committerLeah Neukirchen <leah@vuxu.org>2023-06-26 14:28:31 +0200
commit95274e1b5d5826d0248b1053388592cec744864e (patch)
tree5f4788b05ab33be2f6338051c2fcf9d3a4c5bd72 /xlocate
parentc41f36d4f5153956f97bce655e94c45168cbc941 (diff)
downloadxtools-95274e1b5d5826d0248b1053388592cec744864e.tar.gz
xtools-95274e1b5d5826d0248b1053388592cec744864e.tar.xz
xtools-95274e1b5d5826d0248b1053388592cec744864e.zip
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]
Diffstat (limited to 'xlocate')
-rwxr-xr-xxlocate10
1 files changed, 5 insertions, 5 deletions
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