update_taler-ops.sh (994B)
1 #!/bin/sh 2 3 set -eu 4 5 fetch () { 6 git clean -fdx 7 git fetch 8 # reset to updated upstream branch, but only if we're tracking a branch 9 branch=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null || echo HEAD) 10 git reset --hard "$branch" 11 } 12 13 # Assumes the repo was already checked out once. 14 cd $HOME/taler-ops-www 15 16 git checkout master -f 17 fetch 18 git submodule update --init --force 19 ./bootstrap 20 ./configure --baseurl="https://taler-ops.ch/" --prefix=$HOME/www.taler-ops.ch.wip 21 make build-site 22 make parcel &> /dev/null || true # segfaults on server, not sure why 23 make parcel # 2nd run works... 24 make install-files 25 26 chmod -R g+rx $HOME/www.taler-ops.ch.wip/ 27 28 # Clean up 'ancient' version (before previous) 29 rm -rf $HOME/www.taler-ops.ch.old/ 30 # Finally, do two fast renames to make the current version active 31 mv $HOME/www.taler-ops.ch/ $HOME/www.taler-ops.ch.old/ || true 32 mv $HOME/www.taler-ops.ch.wip/ $HOME/www.taler-ops.ch/ 33 34 cd 35 36 rsync -av --rsh=ssh www.taler-ops.ch www@taler-ops.ch:.