[db_set] Added if statement for "all" condition to apply selection to all tracks
This commit is contained in:
parent
1c9dc28a03
commit
dc2f09d4e3
1 changed files with 5 additions and 0 deletions
|
@ -21,6 +21,11 @@ db_set() {
|
||||||
local SELECTED="${3}"; shift 3
|
local SELECTED="${3}"; shift 3
|
||||||
local CONDITION="${@}"
|
local CONDITION="${@}"
|
||||||
|
|
||||||
|
if [[ "${CONDITION}" == "all" ]]; then
|
||||||
|
gawk -i inplace -v selected=${SELECTED} 'BEGIN{FS="\t";}{$1=selected}{print $0}' "${DB_FILE}"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Defines what imageids are imported into database, as we're only going to act on those
|
# Defines what imageids are imported into database, as we're only going to act on those
|
||||||
local FIELD="$(echo ${CONDITION} | cut -d'=' -f1 | tr '[:lower:]' '[:upper:]' )"
|
local FIELD="$(echo ${CONDITION} | cut -d'=' -f1 | tr '[:lower:]' '[:upper:]' )"
|
||||||
local VALUE="$(echo ${CONDITION} | cut -d'=' -f2 | tr '[:lower:]' '[:upper:]' )"
|
local VALUE="$(echo ${CONDITION} | cut -d'=' -f2 | tr '[:lower:]' '[:upper:]' )"
|
||||||
|
|
Loading…
Reference in a new issue