Mask dots in grep regexp

This commit is contained in:
Andrew Lukoshko 2019-06-10 19:42:54 +03:00 committed by GitHub
parent a9f07c9e13
commit a0506cccf7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -266,7 +266,7 @@ fi
sudo touch -d "23 hours ago" $config_dir/default.cfg
spec_name=`ls -1 $build_package | grep '.spec$'`
spec_name=`ls -1 $build_package | grep '\.spec$'`
echo '--> Build src.rpm'
try_rebuild=true
retry=0
@ -384,7 +384,7 @@ find_spec() {
[ "$rerun_tests" = 'true' ] && return 0
# Check count of *.spec files (should be one)
x=$(ls -1 | grep -c '.spec$' | sed 's/^ *//' | sed 's/ *$//')
x=$(ls -1 | grep -c '\.spec$' | sed 's/^ *//' | sed 's/ *$//')
if [ "$x" -eq "0" ] ; then
echo '--> There are no spec files in repository.'
exit 1