Skip to content

Instantly share code, notes, and snippets.

@gizmomogwai
Last active June 25, 2021 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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/idea_community_logo@2x.png
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/idea_community_logo@2x.png",
].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