8 apt-get
install devscripts debhelper
16 echo "You must specify a distribution"
20 if [ -z "$MINORDISTRIB" ]
25 if [ ! -d "$DISTRIB" ]
27 echo "$DISTRIB is not supported, you can create the folder or compile for another version."
31 echo "Targetting $DISTRIB..."
33 VERSION
=$
(.
/ryzomcore_version.sh
)
37 echo "Can't parse version from $VERSION_FILE, aborting..."
41 REVISION
=$
($HGBIN identify
-n |
grep -o -P "[0-9]+")
43 DSTFOLDER
=ryzom-core-
$VERSION.
$REVISION
45 if [ ! -d "$DSTFOLDER.orig" ]
47 echo "$DSTFOLDER.orig doesn't exist, did you forget to launch ./update.sh?"
51 # copy files if directory doesn't exist
52 if [ ! -d $DSTFOLDER ]
55 echo "Copying files to $DSTFOLDER..."
56 cp -r -p $DSTFOLDER.orig
$DSTFOLDER
61 echo "Copying debian directory..."
62 # delete debian directory if present
64 # create debian folder
67 cp -r -p ..
/$DISTRIB/debian .
69 # returning the line with the version
70 LAST_VERSION
=`grep $VERSION.$REVISION debian/changelog`
71 FULL_VERSION
=$VERSION.
$REVISION-1~
$DISTRIB$MINORDISTRIB
73 # adding the new version to changelog
74 if [ -z "$LAST_VERSION" ]
76 echo "Adding $FULL_VERSION to debian/changelog for $DISTRIB"
77 $DCHBIN --force-distribution -b -v $FULL_VERSION -D $DISTRIB "New upstream release (revision $REVISION)"
79 echo "Last version is $LAST_VERSION"
82 echo "Creating source package..."
88 echo "If you want to upload source to your PPA, type: dput <ppa> ryzom-core_"$FULL_VERSION"_source.changes"