20 lines
276 B
Bash
Executable file
20 lines
276 B
Bash
Executable file
#!/bin/bash
|
|
|
|
export DIR=$(dirname $0)
|
|
|
|
function prefix_date(){
|
|
while read line
|
|
do
|
|
echo [$(date)] $line
|
|
done
|
|
}
|
|
|
|
function run_update(){
|
|
cd $DIR
|
|
echo run autoupdate in $(pwd)
|
|
git pull
|
|
cd backend
|
|
python3 manage.py migrate
|
|
}
|
|
|
|
run_update | prefix_date >> $DIR/update.log
|