Compare commits
No commits in common. "fdf1ebfa930a6b96d4522180b0725300df9e87d8" and "87dbf994eee9743bc27ed6e932189e57e64029b0" have entirely different histories.
fdf1ebfa93
...
87dbf994ee
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -1,29 +1,22 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
source ../apikey
|
||||||
error_exit() {
|
|
||||||
echo "Error: $1"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
source ../.apikey || error_exit "Cannot find apikey"
|
|
||||||
|
|
||||||
d=`date +%Y%m%d`
|
d=`date +%Y%m%d`
|
||||||
|
|
||||||
echo "Todays date $d"
|
#echo "Todays date $d"
|
||||||
#mv "missing.mcl" "missing_old.mcl"
|
#mv "missing.mcl" "missing_old.mcl"
|
||||||
|
|
||||||
fromdate=$(ls -1 *_latest.mcl |grep -Eo '[[:digit:]]{8}') || error_exit "cannot latest mcl file"
|
fromdate=$(ls -1 *_latest.mcl |grep -Eo '[[:digit:]]{8}')
|
||||||
|
|
||||||
|
#echo "Last date run $fromdate"
|
||||||
|
|
||||||
echo "Last date run $fromdate"
|
python2 "update_missing.py" "$fromdate""_latest.mcl" "$d"".mcl" $api_key $fromdate $d
|
||||||
|
|
||||||
python2 "update_missing.py" "$fromdate""_latest.mcl" "$d"".mcl" $api_key $fromdate $d || error_exit "update_missing.py failed"
|
cp "$d"".mcl" "$d""_latest.mcl"
|
||||||
|
mv "$fromdate""_latest.mcl" "archive/""$fromdate"".mcl"
|
||||||
mv "$d"".mcl" "$d""_latest.mcl" || error_exit "cannot cp $d to latest"
|
|
||||||
mv "$fromdate""_latest.mcl" "archive/""$fromdate"".mcl" || error_exit "cannot mv to archive"
|
|
||||||
|
|
||||||
git add "$d""_latest.mcl" "archive/"
|
git add "$d""_latest.mcl" "archive/"
|
||||||
git commit -m "Updated $d"
|
git commit -m "Updated $d"
|
||||||
|
|
||||||
#git push origin master
|
git push origin master
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user