summaryrefslogtreecommitdiff
path: root/tools/update/update.sh
blob: 5bcdafb2c18f40a9ba1fef72527d0891028d8391 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env bash

# Pull the git repo. uwsgi will automatically restart the
# application as necessary.

# Get to our root directory
UPDDIR=$(dirname $0)
cd $UPDDIR

# Unconditionally update the static content (we don't need to reload
# lighttpd for this, so there is no need to actually check for last
# updates or anything like that)
cd $UPDDIR/../../../pgweb-static
git pull -q >/dev/null 2>&1


# Now pull the main repo
cd $UPDDIR

# Sleep 10 seconds to avoid interfering with the automirror scripts that
# also run exactly on the minute.
sleep 10

# Pull changes from the git repo
git pull --rebase -q >/dev/null 2>&1