Merge pull request #6 from andrewlukoshko/master

Mask dots in grep regexp
This commit is contained in:
Alexander Stefanov 2019-06-12 00:13:07 +03:00 committed by GitHub
commit c6369f5127
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 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' echo '--> Build src.rpm'
try_rebuild=true try_rebuild=true
retry=0 retry=0
@ -384,7 +384,7 @@ find_spec() {
[ "$rerun_tests" = 'true' ] && return 0 [ "$rerun_tests" = 'true' ] && return 0
# Check count of *.spec files (should be one) # 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 if [ "$x" -eq "0" ] ; then
echo '--> There are no spec files in repository.' echo '--> There are no spec files in repository.'
exit 1 exit 1