From cd5b1dc8156b45c6627d3cb48c56d15253a5a31c Mon Sep 17 00:00:00 2001 From: Richard Helgeby Date: Sat, 26 Dec 2009 21:27:22 +0100 Subject: [PATCH] Updated scripts to include source code in release packages. --- build.sh | 7 +++++++ updateversion.sh | 12 +++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 7832602..4216120 100644 --- a/build.sh +++ b/build.sh @@ -67,6 +67,9 @@ then exit 1 fi +# Rebuild hgversion.h.inc for unofficial builds. +sh updateversion.sh --unofficial + # Copy files. echo "Copying documentation..." @@ -77,6 +80,10 @@ echo "Copying plugin binary..." mkdir -p $PLUGINDIR cp -r $BUILDDIR/$PLUGINFILE $PLUGINDIR/$PLUGINFILE +echo "Copying plugin source code..." +mkdir -p $SOURCE_DEST +cp -r $SOURCEDIR $SOURCE_DEST + if [ $MAKEPATCH = "false" ] then # Copy all files. diff --git a/updateversion.sh b/updateversion.sh index 0a1d38b..6cda2d7 100755 --- a/updateversion.sh +++ b/updateversion.sh @@ -6,9 +6,16 @@ # Program for printing date. ZR_DATEPATH='date' +ZR_UNOFFICIAL=false + if [ "$1" ] then - ZR_DATEPATH=$1 + if [ "$1" = "--unofficial" ] + then + ZR_UNOFFICIAL=true + else + ZR_DATEPATH=$1 + fi fi ZR_VERSION_FILE="src/zr/hgversion.h.inc" @@ -23,8 +30,7 @@ echo "#define ZR_VER_PRODUCT_NAME \"$ZR_PRODUCT_NAME\"" > $ZR_VERSION_FILE echo "#define ZR_VER_COPYRIGHT \"$ZR_COPYRIGHT\"" >> $ZR_VERSION_FILE echo "#define ZR_VER_VERSION VERSION" >> $ZR_VERSION_FILE echo "#define ZR_VER_BRANCH \"$ZR_BRANCH\"" >> $ZR_VERSION_FILE -#echo "#define ZR_VER_BRANCH \"$(hg id -b)\"" >> $ZR_VERSION_FILE -echo "#define ZR_VER_REVISION \"$(hg id -n):$(hg id -i)\"" >> $ZR_VERSION_FILE +echo "#define ZR_VER_REVISION \"$ZR_REVISION\"" >> $ZR_VERSION_FILE echo "#define ZR_VER_LICENSE \"$ZR_LICENSE\"" >> $ZR_VERSION_FILE echo "#define ZR_VER_DATE \"$ZR_DATE\"" >> $ZR_VERSION_FILE