summaryrefslogtreecommitdiff
path: root/java/makedist.py
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2002-10-30 20:11:24 +0000
committerMark Spruiell <mes@zeroc.com>2002-10-30 20:11:24 +0000
commit75e3f89911b99fbd94b4e605e34f95aac2d87211 (patch)
tree6884b70a543963c2e311c75d95f6643304a642c9 /java/makedist.py
parentCopyright fixes (diff)
downloadice-75e3f89911b99fbd94b4e605e34f95aac2d87211.tar.bz2
ice-75e3f89911b99fbd94b4e605e34f95aac2d87211.tar.xz
ice-75e3f89911b99fbd94b4e605e34f95aac2d87211.zip
initial check-in
Diffstat (limited to 'java/makedist.py')
-rwxr-xr-xjava/makedist.py84
1 files changed, 84 insertions, 0 deletions
diff --git a/java/makedist.py b/java/makedist.py
new file mode 100755
index 00000000000..68889fa02c6
--- /dev/null
+++ b/java/makedist.py
@@ -0,0 +1,84 @@
+#!/usr/bin/env python
+# **********************************************************************
+#
+# Copyright (c) 2002
+# ZeroC, Inc.
+# Billerica, MA, USA
+#
+# All Rights Reserved.
+#
+# Ice is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License version 2 as published by
+# the Free Software Foundation.
+#
+# **********************************************************************
+
+import os, sys, fnmatch, re
+
+#
+# Remove a file or directory (recursive).
+#
+def rm(path):
+ if os.path.isdir(path) and not os.path.islink(path):
+ for x in os.listdir(path):
+ rm(os.path.join(path, x))
+ os.rmdir(path)
+ else:
+ os.remove(path)
+
+#
+# Check arguments
+#
+tag = "-rHEAD"
+for x in sys.argv[1:]:
+ if x == "-h":
+ print "usage: " + sys.argv[0] + " [-h] [tag]"
+ sys.exit(0)
+ else:
+ tag = "-r" + x
+
+#
+# Remove any existing "dist" directory and create a new one.
+#
+if os.path.exists("dist"):
+ rm("dist")
+os.mkdir("dist")
+os.chdir("dist")
+
+#
+# Export sources from CVS.
+#
+os.system("cvs -z5 -d cvs.mutablerealms.com:/home/cvsroot export " + tag + " icej")
+
+#
+# Remove files.
+#
+filesToRemove = [ \
+ "makedist.py", \
+ ]
+for x in filesToRemove:
+ rm(x)
+
+#
+# Get Ice version.
+#
+config = open("icej/src/IceUtil/Version.java", "r")
+version = re.search("ICE_STRING_VERSION = \"(.*)\"", config.read()).group(1)
+
+#
+# Create archives.
+#
+icever = "IceJ-" + version
+os.mkdir(icever)
+os.rename("icej", os.path.join(icever, "icej"))
+os.system("tar cvzf " + icever + ".tar.gz " + icever)
+os.system("zip -9 -r " + icever + ".zip " + icever)
+
+#
+# Copy files (README, etc.).
+#
+
+#
+# Done.
+#
+rm(icever)