Skip to content

Commit

Permalink
Revert "Merge pull request #456 from erenfro/master"
Browse files Browse the repository at this point in the history
This reverts commit fdfff94, reversing
changes made to 76ce3de.
  • Loading branch information
TheLocehiliosan committed Aug 6, 2023
1 parent fdfff94 commit 4caadf7
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions yadm
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,13 @@ function score_file() {
return
fi
elif [[ "$label" =~ ^(d|distro)$ ]]; then
value=$("${AWK_PROGRAM[0]}" '{print tolower($0)}' <<<"$value")
if [ "${value/\ /_}" = "${local_distro/\ /_}" ]; then
score=$((score + 4))
else
score=0
return
fi
elif [[ "$label" =~ ^(f|distro_family)$ ]]; then
value=$("${AWK_PROGRAM[0]}" '{print tolower($0)}' <<<"$value")
if [ "${value/\ /_}" = "${local_distro_family/\ /_}" ]; then
score=$((score + 8))
else
Expand Down Expand Up @@ -1524,7 +1522,7 @@ function query_distro() {
fi
done < "$OS_RELEASE"
fi
"${AWK_PROGRAM[0]}" '{print tolower($0)}' <<<"$distro"
echo "$distro"
}

function query_distro_family() {
Expand All @@ -1535,13 +1533,10 @@ function query_distro_family() {
family="${line#ID_LIKE=}"
family="${family//\"}"
break
elif [[ -z "$family" && "$line" = ID=* ]]; then
family="${line#ID=}"
family="${family//\"}"
fi
done < "$OS_RELEASE"
fi
"${AWK_PROGRAM[0]}" '{print tolower($0)}' <<<"$distro"
echo "$family"
}

function process_global_args() {
Expand Down

0 comments on commit 4caadf7

Please sign in to comment.