Fixed issue #455-lowercasing checks on both sides - More POSIX friendly 3
This commit is contained in:
parent
a72c566da8
commit
8bfc09c0d8
1 changed files with 8 additions and 4 deletions
12
yadm
12
yadm
|
@ -204,7 +204,8 @@ function score_file() {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
elif [[ "$label" =~ ^(d|distro)$ ]]; then
|
elif [[ "$label" =~ ^(d|distro)$ ]]; then
|
||||||
value=$(echo "$value" | "${AWK_PROGRAM[0]}" '{print tolower($0)}')
|
#value=$(echo "$value" | "${AWK_PROGRAM[0]}" '{print tolower($0)}') # FIXME Remove
|
||||||
|
value=$("${AWK_PROGRAM[0]}" '{print tolower($0)}' <<<"$value")
|
||||||
if [ "${value/\ /_}" = "${local_distro/\ /_}" ]; then
|
if [ "${value/\ /_}" = "${local_distro/\ /_}" ]; then
|
||||||
score=$((score + 4))
|
score=$((score + 4))
|
||||||
else
|
else
|
||||||
|
@ -212,7 +213,8 @@ function score_file() {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
elif [[ "$label" =~ ^(f|distro_family)$ ]]; then
|
elif [[ "$label" =~ ^(f|distro_family)$ ]]; then
|
||||||
value=$(echo "$value" | "${AWK_PROGRAM[0]}" '{print tolower($0)}')
|
#value=$(echo "$value" | "${AWK_PROGRAM[0]}" '{print tolower($0)}') # FIXME Remove
|
||||||
|
value=$("${AWK_PROGRAM[0]}" '{print tolower($0)}' <<<"$value")
|
||||||
if [ "${value/\ /_}" = "${local_distro_family/\ /_}" ]; then
|
if [ "${value/\ /_}" = "${local_distro_family/\ /_}" ]; then
|
||||||
score=$((score + 8))
|
score=$((score + 8))
|
||||||
else
|
else
|
||||||
|
@ -1524,7 +1526,8 @@ function query_distro() {
|
||||||
fi
|
fi
|
||||||
done < "$OS_RELEASE"
|
done < "$OS_RELEASE"
|
||||||
fi
|
fi
|
||||||
echo "$distro" | "${AWK_PROGRAM[0]}" '{print tolower($0)}'
|
#echo "$distro" | "${AWK_PROGRAM[0]}" '{print tolower($0)}' ## FIXME Remove
|
||||||
|
"${AWK_PROGRAM[0]}" '{print tolower($0)}' <<<"$distro"
|
||||||
}
|
}
|
||||||
|
|
||||||
function query_distro_family() {
|
function query_distro_family() {
|
||||||
|
@ -1541,7 +1544,8 @@ function query_distro_family() {
|
||||||
fi
|
fi
|
||||||
done < "$OS_RELEASE"
|
done < "$OS_RELEASE"
|
||||||
fi
|
fi
|
||||||
echo "$distro" | "${AWK_PROGRAM[0]}" '{print tolower($0)}'
|
#echo "$distro" | "${AWK_PROGRAM[0]}" '{print tolower($0)}' ## FIXME Remove
|
||||||
|
"${AWK_PROGRAM[0]}" '{print tolower($0)}' <<<"$distro"
|
||||||
}
|
}
|
||||||
|
|
||||||
function process_global_args() {
|
function process_global_args() {
|
||||||
|
|
Loading…
Reference in a new issue