[cmd_exclude][cmd_include] Will now output the number of matches for condition
This commit is contained in:
parent
1960232553
commit
9ab2fec0f1
2 changed files with 6 additions and 4 deletions
|
@ -25,8 +25,9 @@ cmd_exclude() {
|
|||
|
||||
for condition in ${conditionList[@]}; do
|
||||
_msg EXEC "Excluding all tracks that match the following condition: ${condition}"
|
||||
db_set ${GIT_DIR} ${DB_FILE} false "${condition}"
|
||||
[[ $? -ne 0 ]] && { _msg WARN; } || { _msg OK; }
|
||||
local MATCHES=$(db_set ${GIT_DIR} ${DB_FILE} false "${condition}" 2>${STDERR} | wc -l )
|
||||
_msg ECHO "${MATCHES} matches"
|
||||
[[ $? -ne 0 ]] && { _msg WARN 2; } || { _msg OK 2; }
|
||||
done
|
||||
local imageidList=($(awk 'BEGIN{FS="\t"}{if($1=="true"){print $2}}' ${DB_FILE} | awk '!seen[$0]++'))
|
||||
local DU="$(print_imageid_du ${GIT_DIR} ${imageidList[@]})"
|
||||
|
|
|
@ -25,8 +25,9 @@ cmd_include() {
|
|||
|
||||
for condition in ${conditionList[@]}; do
|
||||
_msg EXEC "Including all tracks that match the following condition: ${condition}"
|
||||
db_set ${GIT_DIR} ${DB_FILE} true "${condition}"
|
||||
[[ $? -ne 0 ]] && { _msg WARN; } || { _msg OK; }
|
||||
local MATCHES=$(db_set ${GIT_DIR} ${DB_FILE} true "${condition}" | wc -l)
|
||||
_msg ECHO "${MATCHES} matches"
|
||||
[[ $? -ne 0 ]] && { _msg WARN 1; } || { _msg OK 1; }
|
||||
done
|
||||
local imageidList=($(awk 'BEGIN{FS="\t"}{if($1=="true"){print $2}}' ${DB_FILE} | awk '!seen[$0]++'))
|
||||
local DU="$(print_imageid_du ${GIT_DIR} ${imageidList[@]})"
|
||||
|
|
Loading…
Reference in a new issue