Skip to content

Commit 7b485ba

Browse files
authored
Merge pull request #2592 from CSCfi/report_changes.sh-fix
Small fixes to make it work and more readable output
2 parents 523c2b5 + 96cf439 commit 7b485ba

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/report_changes.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
22
set -e
33

4+
GH_BASE="https://github.com/CSCfi/csc-user-guide/blob/master"
5+
46
usage="Usage: $(basename "$0") [-h] [-u]
57
Print last update timestamp and most recent committer for each Docs page.
68
@@ -44,7 +46,7 @@ while read -r line ; do
4446
elif [[ "$line" && -z "${seen[$line]}" ]] ; then
4547
seen["$line"]="$date"
4648
fi
47-
done < <(git log --format="/%H %as %an" --name-only "$GIT_LOG_OPTS")
49+
done < <(git log --format="/%H %as %an" --name-only $GIT_LOG_OPTS)
4850

4951
echo "|Updated|Filename|Head line|"
5052
echo "|:-:|:-:|:-:|"
@@ -60,7 +62,7 @@ git ls-files "$path*.md" | while read -r f ; do
6062
echo "##### $f"
6163
fi
6264

63-
echo "|${seen[$f]}|$f|$head_line|"\
65+
echo "|${seen[$f]}|$GH_BASE/$f|$head_line|"\
6466
| iconv -f iso-8859-1 -t utf-8
6567
fi
6668
done | sort -r | grep "$name"

0 commit comments

Comments
 (0)