Fix text/cdata nodes collection
[pazpar2-moved-to-github.git] / buildscript_centos5.sh
1 PROJECT=$1
2 VERSION=$2
3 TYPE=tar.gz
4
5 if [ "$VERSION" == "" ] ; then 
6     echo buildscript  project version
7     exit 1
8 fi
9 # if (You need to have a rpmbuild directory - Adam has a script in git-tools )
10 # (You need to have .rpmmacros - edit it to point to your rpmbuild)
11 if cd ~/rpmbuild/SOURCES ; then 
12     if tar xzf $PROJECT-$VERSION.$TYPE ; then
13         cd $PROJECT-$VERSION
14         if rpmbuild -ba $PROJECT.spec ; then 
15             echo success. Do upload, and update repo
16         else
17             echo failed to rpmbuild $PROJECT
18         fi
19
20     else
21         echo failed tar xzf $PROJECT-$VERSION.tgz
22     fi
23 else
24     echo "Unable to CD"
25     exit 1;
26 fi