mirror of
https://github.com/TheLocehiliosan/yadm
synced 2025-06-04 00:23: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>")
|
||||
local negate=0
|
||||
if [[ "$label" == ~* ]]; then
|
||||
if [ "${label:0:1}" = "~" ]; then
|
||||
negate=1
|
||||
label="${label:1}"
|
||||
fi
|
||||
|
||||
shopt -s nocasematch
|
||||
local -i delta=-1
|
||||
local -i delta=$(( negate ? 1 : -1 ))
|
||||
case "$label" in
|
||||
default)
|
||||
delta=0
|
||||
|
Loading…
Reference in New Issue
Block a user