35 lines
843 B
Plaintext
35 lines
843 B
Plaintext
|
#!/bin/sh -e
|
||
|
<%text>############################################################</%text>
|
||
|
#
|
||
|
# overnight automation for Theo
|
||
|
#
|
||
|
<%text>############################################################</%text>
|
||
|
|
||
|
if [ "$1" = "--verbose" ]; then
|
||
|
VERBOSE='--verbose'
|
||
|
PROGRESS='--progress'
|
||
|
else
|
||
|
VERBOSE=
|
||
|
PROGRESS=
|
||
|
fi
|
||
|
|
||
|
cd ${envroot}
|
||
|
|
||
|
RATTAIL="bin/rattail --config=app/cron.conf $PROGRESS"
|
||
|
|
||
|
|
||
|
<%text>##############################</%text>
|
||
|
# sync data
|
||
|
<%text>##############################</%text>
|
||
|
|
||
|
% if env.theo_integrates_with == 'corepos':
|
||
|
# CORE-POS -> Theo
|
||
|
$RATTAIL --runas corepos import-corepos-api --delete
|
||
|
% elif env.theo_integrates_with == 'catapult':
|
||
|
# Catapult -> Theo
|
||
|
$RATTAIL --runas catapult import-catapult --delete
|
||
|
% endif
|
||
|
|
||
|
# make sure version data is correct
|
||
|
$RATTAIL --runas theo import-versions --delete --dry-run --warnings
|