summaryrefslogtreecommitdiff
path: root/build
blob: f6d80f4459bbecde58f88685f93936558382f026 (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
26
27
28
#!/bin/bash
set -e
shopt -s nullglob

if [ ! -f mysql_connect.inc.php ]; then
  echo "Missing file mysql_connect.inc.php!"
  if [ "$1" != "--force" ]; then
    echo "Aborting... (use --force to continue)"
    exit 1
  else
    echo "Continuing anyway..."
  fi
fi

make clean
make publish

if [ -f mysql_connect.inc.php ]; then
  cp mysql_connect.inc.php output/
fi

ln -s /srv/hidden output/hidden
ln -s /srv/stuff output/stuff
ln -s /srv/photos output/photos

make rsync_publish

echo "Ready!"