Created
April 16, 2021 07:54
-
-
Save A-D-E-A/15aa02e0d20449d6eb44dbdc3421af32 to your computer and use it in GitHub Desktop.
Gource over multiple projects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Gource over all repos. | |
declare -A paths # Associative array | |
paths[project1]="/your/path/to/p1" | |
paths[project2]="/your/path/to/p2" | |
#... | |
files='' | |
for project in ${!paths[*]} | |
do | |
gource --output-custom-log "/your/path/to/bashcript/$project.txt" ${paths[$project]} | |
sed -i -r "s#(.+)\|#\1|/$project#" "$project.txt" # To prefix each project, show them on different branches. | |
files="${files} $project.txt" | |
done | |
# To remove some files, like imports or gitkeep. | |
sed -i '/regextoremove/d' ./projectonwhichremove.txt | |
cat $files | sort -n > combined.txt | |
gource combined.txt --title "YourTitle" --key --seconds-per-day 1 --hide-root |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment