swh-lister/bin/update-github-list
Stefano Zacchiroli 49aff6e3d6 update-github-list: do not override PYTHONPATH
setting it properly is the responsibility of the caller
2015-09-10 18:18:26 +02:00

24 lines
987 B
Bash
Executable file

#!/bin/bash
# PYTHONPATH should be set via cron
# export PYTHONPATH=$HOME/src/swh-lister-github/
logfile=$HOME/.cache/ghlister/log/ghlister.$(date +%Y%m%d).log
# catchup with recent changes
$HOME/src/github-list-repos/bin/ghlister catchup &> $logfile
# XXX: computing the following stats via this script forced to have double
# configuration for shell-vs-python. Also it's unneeded: we can compute the
# same information (number of repos created per day) from the DB, via the
# last_seen column.
# dbservice=lister-github
# dbconn="service=${dbservice}"
# psql="psql --no-psqlrc --pset t --pset format=unaligned ${dbconn}"
# # compute and store current totals
# all_repos=$(echo "select count(*) from repos" | $psql)
# fork_repos=$(echo "select count(*) from fork_repos" | $psql)
# orig_repos=$(echo "select count(*) from orig_repos" | $psql)
# echo "insert into repos_history(repos, fork_repos, orig_repos) values (${all_repos}, ${fork_repos}, ${orig_repos})" | $psql > /dev/null