2020-11-09 13:47:30 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-11-09 14:52:02 +00:00
|
|
|
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(){
|
2020-11-09 14:52:02 +00:00
|
|
|
cd $DIR
|
|
|
|
echo run autoupdate in $(pwd)
|
2020-11-09 13:47:30 +00:00
|
|
|
git pull
|
|
|
|
cd backend
|
2020-11-09 14:52:02 +00:00
|
|
|
python3 manage.py migrate
|
2020-11-09 13:47:30 +00:00
|
|
|
}
|
|
|
|
|
2020-11-09 14:52:02 +00:00
|
|
|
run_update | prefix_date >> $DIR/update.log
|