diff options
Diffstat (limited to 'compute-tree-sizes.sh')
-rwxr-xr-x | compute-tree-sizes.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/compute-tree-sizes.sh b/compute-tree-sizes.sh new file mode 100755 index 0000000..efc54e5 --- /dev/null +++ b/compute-tree-sizes.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +## SPDX-License-Identifier: CC0-1.0 +## +## Copyright (C) 2025 Woj. Kosior <koszko@koszko.org> + +set -e + +RESULTS_PATH="$1" + +COLUMN_NAMES="NAME IN-DEBIAN BREAKING-CHANGES" +for TREE_KIND in $(./helper.sh --get-tree-kinds); do + for MEASURE_TYPE in $(./helper.sh --get-measure-types); do + COLUMN_NAMES="$COLUMN_NAMES $TREE_KIND-$MEASURE_TYPE" + done +done + +./helper.sh --get-csv-columns "$RESULTS_PATH" $COLUMN_NAMES | + grep -vE ',[A-Z]+-n/a' | + sed ' + s/,ID-yes,/,1,/; + s/,ID-no,/,0,/; + s/,BC-yes,/,1,/; + s/,BC-no[^,]*,/,0,/; + s/[A-Z]\+-\([0-9]\)/\1/g; + ' |