aboutsummaryrefslogtreecommitdiffhomepage
path: root/post_process_dist.sh
diff options
context:
space:
mode:
authorGravatar Feng Xiao <xfxyjwf@gmail.com>2014-12-03 17:37:42 -0800
committerGravatar Feng Xiao <xfxyjwf@gmail.com>2014-12-03 17:37:42 -0800
commit6936f17b886f18b572cf5966f64d4a814a151044 (patch)
tree67c96ce0e4f3a9b47b4ca0871632fc5682a1747d /post_process_dist.sh
parent137dd0f17f91ca008fa2ab0a17b1e02865e8f8ca (diff)
Update post_process_dist.sh to produce a separate package for each
language.
Diffstat (limited to 'post_process_dist.sh')
-rwxr-xr-xpost_process_dist.sh27
1 files changed, 17 insertions, 10 deletions
diff --git a/post_process_dist.sh b/post_process_dist.sh
index 1a4d704e..733fa088 100755
--- a/post_process_dist.sh
+++ b/post_process_dist.sh
@@ -15,8 +15,8 @@
# non-testdata .txt files are converted to Windows-style line endings.
# 5) Cleans up after itself.
-if [ "$1" == "" -o "$2" == "" ]; then
- echo "USAGE: $0 DISTFILE LANGUAGE" >&2
+if [ "$1" == "" ]; then
+ echo "USAGE: $0 DISTFILE" >&2
exit 1
fi
@@ -27,8 +27,9 @@ fi
set -ex
+LANGUAGES="cpp java python"
BASENAME=`basename $1 .tar.gz`
-LANGUAGE=$2
+VERSION=${BASENAME:9}
# Create a directory called "dist", copy the tarball there and unpack it.
mkdir dist
@@ -45,17 +46,23 @@ cd $BASENAME/vsprojects
./convert2008to2005.sh
cd ..
-# Build the dist again in .tar.gz and .tar.bz2 formats.
-./configure DIST_LANG=$LANGUAGE
-make dist-gzip
-make dist-bzip2
+for LANG in $LANGUAGES; do
+ # Build the dist again in .tar.gz
+ ./configure DIST_LANG=$LANG
+ make dist-gzip
+ mv $BASENAME.tar.gz ../protobuf-$LANG-$VERSION.tar.gz
+done
# Convert all text files to use DOS-style line endings, then build a .zip
# distribution.
todos *.txt */*.txt
-make dist-zip
-# Clean up.
-mv $BASENAME.tar.gz $BASENAME.tar.bz2 $BASENAME.zip ..
+for LANG in $LANGUAGES; do
+ # Build the dist again in .zip
+ ./configure DIST_LANG=$LANG
+ make dist-zip
+ mv $BASENAME.zip ../protobuf-$LANG-$VERSION.zip
+done
+
cd ..
rm -rf $BASENAME