From e32e82608340830bb7b7c8ee1227b423bc9c5e1e Mon Sep 17 00:00:00 2001 From: Benjamin Mako Hill Date: Tue, 7 Apr 2020 16:39:58 -0500 Subject: [PATCH 1/1] updated script to ensure the correct working dir --- cron-wikipedia_revisions.sh | 4 ++++ cron-wikipedia_views.sh | 3 +++ 2 files changed, 7 insertions(+) diff --git a/cron-wikipedia_revisions.sh b/cron-wikipedia_revisions.sh index 5ba02ed..f836c47 100755 --- a/cron-wikipedia_revisions.sh +++ b/cron-wikipedia_revisions.sh @@ -1,5 +1,8 @@ #!/bin/bash -x +WORKING_DIR="/home/SOC.NORTHWESTERN.EDU/bmh1867/covid19" +cd $WORKING_DIR + TZ="UTC" date_string=$(date +%Y%m%d) @@ -15,3 +18,4 @@ mv wikipedia/data/${revs_tsv} /var/www/covid19/wikipedia revs_json="digobs_covid19-wikipedia-enwiki_revisions-${date_string}.json" xz wikipedia/data/${revs_json} mv wikipedia/data/${revs_json}.xz /var/www/covid19/wikipedia + diff --git a/cron-wikipedia_views.sh b/cron-wikipedia_views.sh index 4afe380..bb2f621 100755 --- a/cron-wikipedia_views.sh +++ b/cron-wikipedia_views.sh @@ -1,5 +1,8 @@ #!/bin/bash -x +WORKING_DIR="/home/SOC.NORTHWESTERN.EDU/bmh1867/covid19" +cd $WORKING_DIR + TZ="UTC" date_string=${OVERRIDE_DATE_STRING:-$(date +%Y%m%d)} -- 2.39.5