2022-07-08 10:29:37 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
d=`date +%Y%m%d`
|
|
|
|
|
2022-07-08 10:38:46 +02:00
|
|
|
#echo "Todays date $d"
|
2022-07-08 10:29:37 +02:00
|
|
|
#mv "missing.mcl" "missing_old.mcl"
|
|
|
|
|
|
|
|
fromdate=$(ls -1 *_latest.mcl |grep -Eo '[[:digit:]]{8}')
|
|
|
|
|
2022-07-08 10:38:46 +02:00
|
|
|
#echo "Last date run $fromdate"
|
2022-07-08 10:29:37 +02:00
|
|
|
|
|
|
|
python2 "update_missing.py" "$fromdate""_latest.mcl" "$d"".mcl" <API KEY> $fromdate $d
|
|
|
|
|
|
|
|
cp "$d"".mcl" "$d""_latest.mcl"
|
2022-07-08 10:38:46 +02:00
|
|
|
mv "$fromdate""_latest.mcl" "archive/""$fromdate"".mcl"
|
|
|
|
|
|
|
|
git add "$d""_latest.mcl" "archive/"
|
|
|
|
git commit -m "Updated $d"
|
|
|
|
|
|
|
|
git push origin master
|
2022-07-08 10:29:37 +02:00
|
|
|
|