1
0
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:
AaronYoung5 2025-02-25 05:42:45 -05:00
parent 99593d9661
commit c3b7950267

4
yadm
View File

@ -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