diff options
author | SeongJae Park <sj@kernel.org> | 2022-12-29 17:06:55 +0000 |
---|---|---|
committer | SeongJae Park <sj@kernel.org> | 2022-12-29 17:08:59 +0000 |
commit | 41857c33e094aa5d59c923e4c9b5608812d17a75 (patch) | |
tree | bc0e2f1b9766286150dfc73d76079b5930cd94ae | |
parent | 71fd496360c54f252252af4dc700d82e6db94e77 (diff) | |
download | damon-hack-41857c33e094aa5d59c923e4c9b5608812d17a75.tar.gz |
stat_damon_portion_*: Receive stat branches file
Signed-off-by: SeongJae Park <sj@kernel.org>
-rwxr-xr-x | stat_damon_portion_community_commits.sh | 7 | ||||
-rwxr-xr-x | stat_damon_portion_lines.sh | 7 | ||||
-rwxr-xr-x | stat_damon_portion_nr_commits.sh | 7 |
3 files changed, 12 insertions, 9 deletions
diff --git a/stat_damon_portion_community_commits.sh b/stat_damon_portion_community_commits.sh index 5b9acd1..fcc894e 100755 --- a/stat_damon_portion_community_commits.sh +++ b/stat_damon_portion_community_commits.sh @@ -1,13 +1,14 @@ #!/bin/bash -if [ $# -ne 1 ] +if [ $# -ne 2 ] then - echo "Usage: $0 <linux dir>" + echo "Usage: $0 <linux dir> <stat branches>" exit 1 fi bindir=$(realpath $(dirname "$0")) linux_dir=$1 +stat_branches=$(realpath "$2") cd "$linux_dir" pr_stat() @@ -32,7 +33,7 @@ pr_stat() } echo "range from_sj from_comm from_comm portion" -versions=( $(cat "$bindir/stat_branches") ) +versions=( $(cat "$stat_branches") ) prev_version="${versions[0]}" for version in "${versions[@]:1}" do diff --git a/stat_damon_portion_lines.sh b/stat_damon_portion_lines.sh index f461c24..4ab74df 100755 --- a/stat_damon_portion_lines.sh +++ b/stat_damon_portion_lines.sh @@ -1,18 +1,19 @@ #!/bin/bash -if [ $# -ne 1 ] +if [ $# -ne 2 ] then - echo "Usage: $0 <linux dir>" + echo "Usage: $0 <linux dir> <stat branches>" exit 1 fi bindir=$(realpath $(dirname "$0")) linux_dir=$1 +stat_branches=$(realpath "$2") cd "$linux_dir" # echo "range damon mm damon/mm linux damon/linux" echo "range damon mm damon/mm" -versions=( $(cat "$bindir/stat_branches") ) +versions=( $(cat "$stat_branches") ) prev_version="${versions[0]}" for version in "${versions[@]:1}" do diff --git a/stat_damon_portion_nr_commits.sh b/stat_damon_portion_nr_commits.sh index 10d4c8d..573e6df 100755 --- a/stat_damon_portion_nr_commits.sh +++ b/stat_damon_portion_nr_commits.sh @@ -1,16 +1,17 @@ #!/bin/bash -if [ $# -ne 1 ] +if [ $# -ne 2 ] then - echo "Usage: $0 <linux dir>" + echo "Usage: $0 <linux dir> <stat branches>" exit 1 fi bindir=$(realpath $(dirname "$0")) linux_dir=$1 +stat_branches=$(realpath "$2") cd "$linux_dir" -versions=( $(cat "$bindir/stat_branches") ) +versions=( $(cat "$stat_branches") ) prev_version="${versions[0]}" echo "range damon mm damon/mm linux damon/linux" for version in "${versions[@]:1}" |