1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
samba-mirror/packaging/Mandrake/makerpms-cvs.sh
0001-01-01 00:00:00 +00:00

35 lines
871 B
Bash

#!/bin/bash
# makerpms-cvs.sh
# A quick script to build RPMs from cvs to test packaging
# Buchan Milne <bgmilne@cae.co.za>
[ $# -lt 1 ] && echo "Usage: $0 <Samba version>" && exit 1
VERSION=$1cvs
RELEASE=`date +%Y%m%d`
shift
# Replace PRELEASE and PVERSION with release number in all files ending with
# .tmpl
FILES=$(find . -name "*.tmpl" -type f)
for i in $FILES;do
NEW=$(echo $i|sed -e 's/\.tmpl//g');
cat $i |sed -e 's/PVERSION/'$VERSION'/g; s/PRELEASE/'$RELEASE'/g'> $NEW ;
done
#Change up three directories, rename directory to samba-$VERSION, change back
#then run makerpms.sh
(
CURRENT=$(pwd)
cd $(dirname $(dirname $(dirname $CURRENT)))
SAMBA_DIR=$(basename $(dirname $(dirname $CURRENT)))
mv $SAMBA_DIR samba-$VERSION
cd samba-$VERSION/packaging/Mandrake
sh makerpms.sh $@
cd $(dirname $(dirname $(dirname $CURRENT)))
mv samba-$VERSION $SAMBA_DIR
)