aboutsummaryrefslogtreecommitdiffstats
path: root/tools/pwg_rel_create.sh
blob: 4f62a914cd0b1c745025d8c3cc56a58a2e6f3ad9 (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
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash

# +--------------------------------------------------------------------------+
# |                            pwg_rel_create.sh                             |
# +--------------------------------------------------------------------------+
# | author        : Pierrick LE GALL <http://le-gall.net/pierrick>           |
# | project       : Piwigo                                                   |
# +--------------------------------------------------------------------------+

if [ $# -lt 2 ]
then
  echo
  echo 'usage : '$(basename $0)' <tag> <version number>'
  echo
  exit 1
fi

tag=$1
version=$2

name=piwigo-$version

cd /tmp

if [ -e $version ]
then
  rm -rf $version
fi
mkdir $version
cd $version

svn export http://piwigo.org/svn/tags/$tag piwigo

# creating database.inc.php empty and writeable
touch piwigo/local/config/database.inc.php
chmod a+w piwigo/local/config/database.inc.php

zip -r $name.zip piwigo

echo cd /tmp/$version