rattail-fabric/rattail_fabric/deploy/backup/backup-everything.mako

31 lines
572 B
Plaintext
Raw Normal View History

#!/bin/sh -e
if [ "$1" = "-v" -o "$1" = "--verbose" ]; then
VERBOSE='--verbose'
QUIET=
PROGRESS='--progress'
CONFIG='app/rattail.conf'
else
VERBOSE=
QUIET='--quiet'
PROGRESS=
CONFIG='app/silent.conf'
fi
cd /srv/envs/${envname}
RATTAIL="bin/rattail --config=$CONFIG $PROGRESS"
PIP='bin/pip'
export PIP_CONFIG_FILE=pip.conf
$PIP install --upgrade pip
cd src/rattail
sudo -u ${user} git pull $QUIET
sudo -u ${user} find . -name '*.pyc' -delete
cd -
$PIP install --upgrade --upgrade-strategy eager --editable src/rattail
$RATTAIL backup