Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > b84feee90c4b5769069bd5ce89628b6c > files > 4

harbour-3.2.0-0.18748_111.2.mga3.src.rpm

#!/bin/bash
# hb_mk_tar [revision]
# Since the split of several major contribs to a separate vcs
# (Sept 2012) this script will re-merge them into one tarball
##############################################################
# Run this script in SOURCES with ./hb_mk_tar [core revision]
##############################################################

# Remove any pre-existng harbour folder
[[ -e harbour ]] && rm -rf harbour
[[ ${#1} > 0 ]] && rm -rf hbcore && rev="-r $1"
# Checkout Harbour svn trunk (or update an existing copy)
if [[ -e hbcore ]];then 
cd hbcore
svn up
cd ..
else
svn co https://harbour-project.svn.sourceforge.net/svnroot/harbour-project/trunk/harbour hbcore
fi

# Get core revision
cd hbcore
hbrev=$(svnversion)
cd ..

# Checkout qtcontribs (or update an existing copy)
if [[ -e qtcontribs ]];then
cd qtcontribs
svn up
cd ..
else
svn co svn://svn.code.sf.net/p/qtcontribs/code/trunk qtcontribs
fi

# Get qtcontribs revision
cd qtcontribs
hbqtrev=$(svnversion)
cd ..
[ ${#hbqtrev} = 0 ] && exit 1
# Make combined tree
mkdir harbour
cp -r hbcore/* harbour
cp -r qtcontribs/* harbour/contrib/
echo $hbrev
echo $hbqtrev
tarev="$hbrev"_"$hbqtrev"
echo $tarev
# Create tarball with harbour.<harbour rev>.<qtcontribs rev>.tar.gz naming.
echo "Please wait creating tarball..."
[[ -f harbour-$tarev.tar.xz ]] && rm harbour-$tarev.tar.xz
tar -cJf harbour-$tarev.tar.xz harbour/ --exclude-vcs
[[ $? == 0 ]] && chmod 644 harbour-$tarev.tar.xz && \
echo "Written harbour-$tarev.tar.xz"