khanat-opennel-code/dist/debian/update.sh

39 lines
889 B
Bash
Raw Permalink Normal View History

#!/bin/sh
HGBIN="/usr/bin/hg"
CODEROOT=../../code
echo "Generating changelogs..."
$HGBIN log -M --style $CODEROOT/changelog.template > $CODEROOT/changelog
REVISION=$($HGBIN identify -n | grep -o -P "[0-9]+")
echo "Found revision $REVISION"
REVISION_H=$CODEROOT/revision
DATE=$(date "+%Y-%m-%d %H:%M:%S")
# Update revision.h with revision and build date
echo $REVISION > $REVISION_H
VERSION=$(./ryzomcore_version.sh)
if [ -z "$VERSION" ]
then
echo "Can't parse version from $VERSION_FILE, aborting..."
exit 1
fi
DSTFOLDER=ryzom-core-$VERSION.$REVISION
# remove destination folder if present
rm -rf $DSTFOLDER.orig
# copy all files
echo "Copying files to $DSTFOLDER..."
cp -r -p $CODEROOT $DSTFOLDER.orig
echo "Removing web files, because we don't need them and they generate lintian errors..."
rm -rf $DSTFOLDER.orig/web
echo "Done. Now launch ./update_debian.sh <distrib>"