multimail/update.sh

21 lines
276 B
Bash
Raw Normal View History

2020-11-09 13:47:30 +00:00
#!/bin/bash
export DIR=$(dirname $0)
2020-11-09 13:47:30 +00:00
function prefix_date(){
while read line
do
echo [$(date)] $line
done
}
function run_update(){
cd $DIR
echo run autoupdate in $(pwd)
2020-11-09 13:47:30 +00:00
git pull
cd backend
python3 manage.py migrate
2020-11-09 13:47:30 +00:00
}
run_update | prefix_date >> $DIR/update.log