Compare commits
2 Commits
87dbf994ee
...
fdf1ebfa93
Author | SHA1 | Date | |
---|---|---|---|
|
fdf1ebfa93 | ||
|
8ad3159d98 |
127145
Update Missing/20220708_latest.mcl
Normal file
127145
Update Missing/20220708_latest.mcl
Normal file
File diff suppressed because one or more lines are too long
878095
Update Missing/Deleted_Comics.txt
Normal file
878095
Update Missing/Deleted_Comics.txt
Normal file
File diff suppressed because it is too large
Load Diff
127145
Update Missing/archive/20220611.mcl
Normal file
127145
Update Missing/archive/20220611.mcl
Normal file
File diff suppressed because one or more lines are too long
@ -1,22 +1,29 @@
|
||||
#!/bin/bash
|
||||
source ../apikey
|
||||
|
||||
error_exit() {
|
||||
echo "Error: $1"
|
||||
exit 1
|
||||
}
|
||||
|
||||
source ../.apikey || error_exit "Cannot find apikey"
|
||||
|
||||
d=`date +%Y%m%d`
|
||||
|
||||
#echo "Todays date $d"
|
||||
echo "Todays date $d"
|
||||
#mv "missing.mcl" "missing_old.mcl"
|
||||
|
||||
fromdate=$(ls -1 *_latest.mcl |grep -Eo '[[:digit:]]{8}')
|
||||
fromdate=$(ls -1 *_latest.mcl |grep -Eo '[[:digit:]]{8}') || error_exit "cannot latest mcl file"
|
||||
|
||||
#echo "Last date run $fromdate"
|
||||
|
||||
python2 "update_missing.py" "$fromdate""_latest.mcl" "$d"".mcl" $api_key $fromdate $d
|
||||
echo "Last date run $fromdate"
|
||||
|
||||
cp "$d"".mcl" "$d""_latest.mcl"
|
||||
mv "$fromdate""_latest.mcl" "archive/""$fromdate"".mcl"
|
||||
python2 "update_missing.py" "$fromdate""_latest.mcl" "$d"".mcl" $api_key $fromdate $d || error_exit "update_missing.py failed"
|
||||
|
||||
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 commit -m "Updated $d"
|
||||
|
||||
git push origin master
|
||||
#git push origin master
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user