2007-11-30 00:03:19 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# +--------------------------------------------------------------------------+
|
|
|
|
# | pwg_rel_create.sh |
|
|
|
|
# +--------------------------------------------------------------------------+
|
|
|
|
# | author : Pierrick LE GALL <http://le-gall.net/pierrick> |
|
2008-05-15 20:43:33 +02:00
|
|
|
# | project : Piwigo |
|
2007-11-30 00:03:19 +01:00
|
|
|
# +--------------------------------------------------------------------------+
|
|
|
|
|
|
|
|
if [ $# -lt 2 ]
|
|
|
|
then
|
|
|
|
echo
|
|
|
|
echo 'usage : '$(basename $0)' <tag> <version number>'
|
|
|
|
echo
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
tag=$1
|
|
|
|
version=$2
|
|
|
|
|
|
|
|
name=phpwebgallery-$version
|
|
|
|
|
|
|
|
cd /tmp
|
|
|
|
if [ -e $name ]
|
|
|
|
then
|
|
|
|
rm -rf $name
|
|
|
|
fi
|
|
|
|
|
2008-01-24 23:00:56 +01:00
|
|
|
if [ -e $version ]
|
|
|
|
then
|
|
|
|
rm -rf $version
|
|
|
|
fi
|
|
|
|
mkdir $version
|
|
|
|
|
|
|
|
# cvs export -r $tag -d $version phpwebgallery
|
2007-11-30 00:03:19 +01:00
|
|
|
svn export http://svn.gna.org/svn/phpwebgallery/tags/$tag $name
|
|
|
|
# creating mysql.inc.php empty and writeable
|
|
|
|
touch $name/include/mysql.inc.php
|
|
|
|
chmod a+w $name/include/mysql.inc.php
|
|
|
|
|
|
|
|
# find $name -name "*.php" \
|
|
|
|
# | xargs grep -l 'branch 1.7' \
|
|
|
|
# | xargs perl -pi -e "s/branch 1.7/${version}/g"
|
|
|
|
|
2008-01-27 22:01:32 +01:00
|
|
|
cd /tmp
|
2007-11-30 00:03:19 +01:00
|
|
|
for ext in zip tar.gz tar.bz2
|
|
|
|
do
|
2008-01-27 22:01:32 +01:00
|
|
|
file=$version/$name.$ext
|
2007-11-30 00:03:19 +01:00
|
|
|
if [ -f $file ]
|
|
|
|
then
|
|
|
|
rm $name
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2008-01-24 23:00:56 +01:00
|
|
|
|
2008-01-27 22:01:32 +01:00
|
|
|
zip -r $version/$name.zip $name
|
|
|
|
tar -czf $version/$name.tar.gz $name
|
|
|
|
tar -cjf $version/$name.tar.bz2 $name
|
|
|
|
|
|
|
|
cd /tmp/$version
|
|
|
|
md5sum p* >MD5SUMS
|