[packages/rpm-build-tools] use ls to expand spec count
glen
glen at pld-linux.org
Sat Jan 9 17:01:53 CET 2016
commit 06994f23d9b80be2e16804b7a4ee72d07aa76254
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sat Jan 9 18:01:45 2016 +0200
use ls to expand spec count
shrc.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/shrc.sh b/shrc.sh
index d0f91f7..b616a41 100755
--- a/shrc.sh
+++ b/shrc.sh
@@ -335,7 +335,7 @@ __bash_parse_git_branch() {
# if we are in rpm subdir and have exactly one .spec in the dir, include package version
__package_rpmversion() {
- if [[ $PWD =~ $(rpm -E %_topdir) ]] && [ "$(echo *.spec | wc -w)" = 1 ]; then
+ if [[ $PWD =~ $(rpm -E %_topdir) ]] && [ "$(\ls *.spec 2>/dev/null | wc -w)" = 1 ]; then
# give only first version (ignore subpackages)
rpm --specfile *.spec -q --qf '%{VERSION}\n' | head -n1
fi
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/06994f23d9b80be2e16804b7a4ee72d07aa76254
More information about the pld-cvs-commit
mailing list