about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDoan Tran Cong Danh <congdanhqx@gmail.com>2019-07-10 15:10:01 +0700
committerLeah Neukirchen <leah@vuxu.org>2019-07-14 15:08:21 +0200
commit08b1152c6a7ad1e9a665516a083b25d0461c4e7e (patch)
tree75a31c8ddc857dcbc8d99a93e05fb5dab21435d1
parente697287c4cad3122ba4fd0efdb1a6f5966395324 (diff)
downloadxtools-08b1152c6a7ad1e9a665516a083b25d0461c4e7e.tar.gz
xtools-08b1152c6a7ad1e9a665516a083b25d0461c4e7e.tar.xz
xtools-08b1152c6a7ad1e9a665516a083b25d0461c4e7e.zip
xdistdir: use xbps-src's exit code
xbps-src show-var XBPS_DISTDIR should return 1 line only anyway.
-rwxr-xr-xxdistdir4
1 files changed, 2 insertions, 2 deletions
diff --git a/xdistdir b/xdistdir
index aac8e49..4fdee68 100755
--- a/xdistdir
+++ b/xdistdir
@@ -3,11 +3,11 @@
 
 git_xbps_src="./$(git rev-parse --show-cdup 2>/dev/null)/xbps-src"
 if [ -x "$git_xbps_src" ]; then
-	"$(readlink -f "$git_xbps_src")" show-var XBPS_DISTDIR | tail -1
+	"$(readlink -f "$git_xbps_src")" show-var XBPS_DISTDIR
 elif [ -n "$XBPS_DISTDIR" ]; then
 	printf '%s\n' "$XBPS_DISTDIR"
 elif [ -x "$(command -v xbps-src)" ]; then
-	"$(readlink -f "$(command -v xbps-src)")" show-var XBPS_DISTDIR | tail -1
+	"$(readlink -f "$(command -v xbps-src)")" show-var XBPS_DISTDIR
 elif [ -d ~/void-packages ]; then
 	echo ~/void-packages
 elif [ -d ~/xbps-packages ]; then