[Xfce4-commits] <midori:master> makedist.midori: Guess current version number automatically
Christian Dywan
noreply at xfce.org
Tue Jun 26 23:10:02 CEST 2012
Updating branch refs/heads/master
to fb008245418fe3f49f7c028ae7fc572d15235d38 (commit)
from a15d4009c2d7dfb9f129cb02e38106439b095a3c (commit)
commit fb008245418fe3f49f7c028ae7fc572d15235d38
Author: Paweł Forysiuk <tuxator at o2.pl>
Date: Tue Jun 26 19:01:33 2012 +0200
makedist.midori: Guess current version number automatically
win32/makedist/makedist.midori | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/win32/makedist/makedist.midori b/win32/makedist/makedist.midori
index f6c0d82..5e6be41 100755
--- a/win32/makedist/makedist.midori
+++ b/win32/makedist/makedist.midori
@@ -36,19 +36,27 @@ temp_dir=`mktemp -d`
have_7zip=`which 7za`
grep -q gtk-3.0 _build/config.log && GTK3_BUILD=1
+version=`grep PACKAGE_VERSION _build/default/config.h | awk '{ print $3 $4; }' | sed 's@(debug)@-debug at g'|sed 's@"@@g'`
+
if [ "$1" != "" ]; then
if [ "$1" == "debug" ]; then
DEBUG_BUILD=1
- else
- version_tag=$1
+ shift
fi
+ version_tag="$1"
+fi
+
+if [ $version_tag != "" ]; then
+ version_tag=$version_tag-$version
+else
+ version_tag=$version
fi
# generate unique filename
if [ "$have_7zip" != "" ]; then
- ARCHIVE=midori$version_tag-`date +%Y%m%d%H%M`.7z
+ ARCHIVE=midori-$version_tag-`date +%Y%m%d%H%M`.7z
else
- ARCHIVE=midori$version_tag-`date +%Y%m%d%H%M`.zip
+ ARCHIVE=midori-$version_tag-`date +%Y%m%d%H%M`.zip
fi
# function: dll-recursive <list of exe and dll files ...>
@@ -94,7 +102,7 @@ grab_files ()
echo -n "Creating $ARCHIVE ."
# create destination folder
-workdir=$temp_dir/midori$version_tag
+workdir=$temp_dir/midori-$version_tag
mkdir $workdir
echo -n .
@@ -242,9 +250,9 @@ ARCHIVE=`pwd`/$ARCHIVE
# store as zip/7z file
pushd $temp_dir > /dev/null
if [ "$have_7zip" != "" ]; then
- 7za a -m0=lzma $ARCHIVE midori$version_tag
+ 7za a -m0=lzma $ARCHIVE midori-$version_tag
else
- zip -rq $ARCHIVE midori$version_tag
+ zip -rq $ARCHIVE midori-$version_tag
fi
popd > /dev/null
More information about the Xfce4-commits
mailing list