Skip to content

Instantly share code, notes, and snippets.

@gizmomogwai
Last active June 25, 2021 16:55
Show Gist options
  • Save gizmomogwai/9f86097eb2368d92cda162b815240eb6 to your computer and use it in GitHub Desktop.
Save gizmomogwai/9f86097eb2368d92cda162b815240eb6 to your computer and use it in GitHub Desktop.
intellij-community
.DS_Store
*.png
#!/bin/bash
# execute in the cloned intellij-community edition git repo https://github.com/JetBrains/intellij-community.git
mkdir temp
filepath=community-resources/src/idea_community_logo.png
for sha in $(git log --format="%H" $filepath); do
git show $sha:$filepath > temp/$sha.file
done
filepath=community-resources/src/[email protected]
for sha in $(git log --format="%H" $filepath); do
git show $sha:$filepath > temp/$sha.file
done
def git
"git -C intellij-community"
end
task :default do
[
"community-resources/src/idea_community_logo.png",
"community-resources/src/[email protected]",
].map{|path|
`#{git} log --format="%h@%cd" --date=format:'%Y-%m-%dT%H-%M-%S' #{path}`
.split("\n")
.map{|line|[path, line]}
}.flatten(1).each {|path, line|
sha, date = line.split("@")
puts "#{path}: #{sha} #{date}"
sh "#{git} show #{sha}:#{path} > #{date}.png"
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment