mirror of
https://github.com/TheLocehiliosan/yadm
synced 2025-06-05 17:13:58 +00:00
Updated alt code based on comments.
This commit is contained in:
parent
99593d9661
commit
c3b7950267
4
yadm
4
yadm
@ -181,13 +181,13 @@ function score_file() {
|
|||||||
|
|
||||||
# Check for negative condition prefix (e.g., "~<label>")
|
# Check for negative condition prefix (e.g., "~<label>")
|
||||||
local negate=0
|
local negate=0
|
||||||
if [[ "$label" == ~* ]]; then
|
if [ "${label:0:1}" = "~" ]; then
|
||||||
negate=1
|
negate=1
|
||||||
label="${label:1}"
|
label="${label:1}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
shopt -s nocasematch
|
shopt -s nocasematch
|
||||||
local -i delta=-1
|
local -i delta=$(( negate ? 1 : -1 ))
|
||||||
case "$label" in
|
case "$label" in
|
||||||
default)
|
default)
|
||||||
delta=0
|
delta=0
|
||||||
|
Loading…
Reference in New Issue
Block a user