mirror of
https://github.com/StevenBlack/hosts.git
synced 2026-07-01 02:36:52 +00:00
Merge pull request #2941 from miallo/compute-stats-in-memory
stats.sh: process files in memory instead of on disk
This commit is contained in:
7
stats.sh
7
stats.sh
@@ -1,12 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
echo \n "" > stats.out
|
||||
# clear file
|
||||
true > stats.out
|
||||
|
||||
for TAG_DATE in $(git tag --sort=creatordate --format='%(refname:short),%(creatordate:short)'); do
|
||||
# echo "$TAG_DATE"
|
||||
split=(${TAG_DATE//,/ })
|
||||
# echo ${split[0]}
|
||||
git checkout tags/${split[0]} readmeData.json
|
||||
entries=$(jq '.base.entries' readmeData.json)
|
||||
entries=$(git show tags/${split[0]}:readmeData.json | jq '.base.entries')
|
||||
if [[ -z "$entries" ]]; then continue; fi
|
||||
echo ${split[1]},${entries} >> stats.out
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user