Add upgrade, restart-overnight-backups scripts for generic backup app
This commit is contained in:
parent
067c02e965
commit
0b5f6234ad
4 changed files with 46 additions and 17 deletions
25
rattail_fabric2/deploy/backup/upgrade.sh.mako
Executable file
25
rattail_fabric2/deploy/backup/upgrade.sh.mako
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
if [ "$1" = "-v" -o "$1" = "--verbose" ]; then
|
||||
VERBOSE='--verbose'
|
||||
QUIET=
|
||||
else
|
||||
VERBOSE=
|
||||
QUIET='--quiet'
|
||||
fi
|
||||
|
||||
PIP="sudo -H -u ${user} PIP_CONFIG_FILE=${envpath}/pip.conf ${envpath}/bin/pip"
|
||||
|
||||
|
||||
# upgrade pip
|
||||
$PIP install $QUIET --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 --upgrade --upgrade-strategy eager --editable .
|
Loading…
Add table
Add a link
Reference in a new issue