summaryrefslogtreecommitdiff
path: root/cpp/makedist.py
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2002-10-31 00:08:11 +0000
committerMark Spruiell <mes@zeroc.com>2002-10-31 00:08:11 +0000
commit827a0d05a3eb0e627acb187659ea0f531e19a1fc (patch)
tree7e12c6b37dbcfda0878f7edf4dba8ceacda77592 /cpp/makedist.py
parentWait for the service communicator to be shutdown before to close the (diff)
downloadice-827a0d05a3eb0e627acb187659ea0f531e19a1fc.tar.bz2
ice-827a0d05a3eb0e627acb187659ea0f531e19a1fc.tar.xz
ice-827a0d05a3eb0e627acb187659ea0f531e19a1fc.zip
more fixes
Diffstat (limited to 'cpp/makedist.py')
-rwxr-xr-xcpp/makedist.py20
1 files changed, 9 insertions, 11 deletions
diff --git a/cpp/makedist.py b/cpp/makedist.py
index 9ac2ddf81b6..700b78082b7 100755
--- a/cpp/makedist.py
+++ b/cpp/makedist.py
@@ -16,17 +16,15 @@
import os, sys, fnmatch, re
#
-# Recursive removal of a directory.
+# Remove a file or directory (recursive).
#
def rm(path):
- files = os.listdir(path)
- for x in files:
- fullpath = os.path.join(path, x)
- if os.path.isdir(fullpath) and not os.path.islink(fullpath):
- rm(fullpath)
- else:
- os.remove(fullpath)
- os.rmdir(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)
#
# Find files matching a pattern.
@@ -70,10 +68,10 @@ os.system("cvs -z5 -d cvs.mutablerealms.com:/home/cvsroot export " + tag + " ice
# Remove files.
#
filesToRemove = [ \
- "makedist.py", \
+ "ice/makedist.py", \
]
for x in filesToRemove:
- os.remove(x)
+ rm(x)
#
# Generate bison files.