From 0e13adff76c5ab655df3b9fb0dcd28b4df5083f5 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 22 Jun 2017 16:43:40 +0200 Subject: remove "grep ... part1*part2" bug --- bin/db-update | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'bin/db-update') diff --git a/bin/db-update b/bin/db-update index eaf0337..01db113 100755 --- a/bin/db-update +++ b/bin/db-update @@ -184,12 +184,13 @@ move_packages() { # add and remove the packages locally if grep -qxF "${repo}" "${tmp_dir}/"*".from_repo"; then + ${dummynator} repo-remove -q \ "${tmp_dir}/${repo}/${repo}.db.tar.gz" \ $( - grep -xF "${repo}" "${tmp_dir}/"*".from_repo" | \ + grep -lxF "${repo}" "${tmp_dir}/"*".from_repo" | \ sed ' - s|\.from_repo:[^:]\+$|.parts_names| + s|\.from_repo$|.parts_names| ' | \ xargs -rn1 cat ) @@ -199,9 +200,9 @@ move_packages() { ${dummynator} repo-add -q \ "${tmp_dir}/${repo}/${repo}.db.tar.gz" \ $( - grep -xF "${repo}" "${tmp_dir}/"*".to_repo" | \ + grep -lxF "${repo}" "${tmp_dir}/"*".to_repo" | \ sed ' - s|\.to_repo:[^:]\+$|| + s|\.to_repo$|| ' | \ while read -r package; do sed \ -- cgit v1.2.3-70-g09d2