about summary refs log tree commit diff
path: root/xlocate
diff options
context:
space:
mode:
authorDuncan Overbruck <mail@duncano.de>2020-09-13 17:44:47 +0200
committerLeah Neukirchen <leah@vuxu.org>2020-09-13 18:24:41 +0200
commit2e884539fb246221905f6945361c032feb4ad604 (patch)
treec294be0239b3da2f726cc119e2b16873481b6cb4 /xlocate
parent79fdecac4c9165098c376655ccf703abd2cc8db8 (diff)
downloadxtools-2e884539fb246221905f6945361c032feb4ad604.tar.gz
xtools-2e884539fb246221905f6945361c032feb4ad604.tar.xz
xtools-2e884539fb246221905f6945361c032feb4ad604.zip
xlocate: error out if the database doesn't exist
Closes: #199 [via git-merge-pr]
Diffstat (limited to 'xlocate')
-rwxr-xr-xxlocate5
1 files changed, 2 insertions, 3 deletions
diff --git a/xlocate b/xlocate
index 49b6ac5..2eec04a 100755
--- a/xlocate
+++ b/xlocate
@@ -81,7 +81,6 @@ if [ -d "$XLOCATE_GIT" ]; then
 	git -c grep.lineNumber=false --git-dir="$XLOCATE_GIT" grep -- "$@" @ |
 		sed 's/^@://; s/:/\t/' | grep .
 else
-	echo "xlocate: database not found, using xbps-query." 1>&2
-	xbps-query --regex -Ro '.*'"$@" |
-		sed 's/ *([^)]*)$//; s/^\([^ ]*\)-[^-]*: /\1\t/'
+	echo "xlocate: database not found, please use xlocate -S." 1>&2
+	exit 1
 fi