rattail-fabric2/rattail_fabric2/deploy/backup/upgrade.sh.mako
Lance Edgar 097a96fc07 Add --progress-bar arg for pip in backup app's upgrade script
for some reason latest pip has progress bar showing up in cron output
and causing unwanted email
2022-02-07 10:47:43 -06:00

28 lines
656 B
Mako
Executable file

#!/bin/sh -e
if [ "$1" = "-v" -o "$1" = "--verbose" ]; then
VERBOSE='--verbose'
QUIET=
PROGRESSBAR='--progress-bar=on'
else
VERBOSE=
QUIET='--quiet'
PROGRESSBAR='--progress-bar=off'
fi
PIP="sudo -H -u ${user} PIP_CONFIG_FILE=${envpath}/pip.conf ${envpath}/bin/pip"
# upgrade pip
$PIP install $QUIET $PROGRESSBAR --upgrade pip
# upgrade rattail
cd ${envpath}/src/rattail
if [ "$(sudo -H -u ${user} git status --porcelain)" != '' ]; then
sudo -H -u ${user} git status
exit 1
fi
sudo -H -u ${user} git pull $QUIET
find . -name '*.pyc' -delete
$PIP install $QUIET $PROGRESSBAR --upgrade --upgrade-strategy eager --editable .