+ # create diff patches
+ BASEVER=${VERSION%.*}.0
+ if [ -e $DIST_DIR/$PACKAGE_NAME-$BASEVER.tar.$EXT ]; then
+ base=$(readlink -f $DIST_DIR/$PACKAGE_NAME-$BASEVER.tar.$EXT)
+ current=$DIST_DIR/$PACKAGE_NAME-$VERSION.tar.$EXT
+ if [ "$(basename $base)" != "$(basename $current)" ]; then
+ sh -x $WORK_DIR/make-diff-patch.sh $base $current
+ chmod 644 $PACKAGE_NAME-$VERSION.patch.xz
+ mv $PACKAGE_NAME-$VERSION.patch.xz $DIST_DIR
+ # for beta and dev channels, update the diff pointer
+ if [ "$CHANNEL" != "stable" ]; then
+ ln -sf $PACKAGE_NAME-$VERSION.tar.$EXT $DIST_DIR/$PACKAGE_NAME-$BASEVER.tar.$EXT
+ fi
+ fi
+ fi