Skip to content

Instantly share code, notes, and snippets.

@A-D-E-A
Created April 16, 2021 07:54
Show Gist options
  • Save A-D-E-A/15aa02e0d20449d6eb44dbdc3421af32 to your computer and use it in GitHub Desktop.
Save A-D-E-A/15aa02e0d20449d6eb44dbdc3421af32 to your computer and use it in GitHub Desktop.
Gource over multiple projects
#!/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