#!/bin/bash # benchsync.sh — copy the catalog's scripts/*.py and templates/ from the DooPlex checkout to /opt/upg on bench 9401. set -e CAT=/mnt/5_hdd/felhom.eu/git/app-catalog-felhom.eu T=$(mktemp /tmp/upg-XXXX.tgz) tar czf $T -C $CAT/scripts $(cd $CAT/scripts && ls *.py) -C $CAT templates scp -q -o BatchMode=yes $T demo-hp:/tmp/upg-sync.tgz ssh -o BatchMode=yes demo-hp "export LC_ALL=C; pct push 9401 /tmp/upg-sync.tgz /tmp/upg-sync.tgz && rm -f /tmp/upg-sync.tgz && pct exec 9401 -- bash -c 'mkdir -p /opt/upg && cd /opt/upg && rm -rf templates && tar xzf /tmp/upg-sync.tgz && rm -f /tmp/upg-sync.tgz && ls templates | wc -l && md5sum upgrade-test.py upgrade_fixtures_box.py'" rm -f $T