diff options
author | Nathan Binkert <binkertn@umich.edu> | 2006-12-01 22:33:18 -0800 |
---|---|---|
committer | Nathan Binkert <binkertn@umich.edu> | 2006-12-01 22:33:18 -0800 |
commit | 5d637417a8fecc881df2f9a8a4e833e6709bafaf (patch) | |
tree | 79c27c4dadac8f972dc1c97dc7eafe9add054724 /util/make_release.py | |
parent | ed50763135885c339009738ff44a8db434ddc93c (diff) | |
download | gem5-5d637417a8fecc881df2f9a8a4e833e6709bafaf.tar.xz |
don't blow away the whole destination directory
--HG--
extra : convert_revision : 7370bad15cc30e75ebb0c8685324d8db06fc2936
Diffstat (limited to 'util/make_release.py')
-rwxr-xr-x | util/make_release.py | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/util/make_release.py b/util/make_release.py index d1161166d..47b6678fe 100755 --- a/util/make_release.py +++ b/util/make_release.py @@ -80,18 +80,31 @@ if len(sys.argv) != 3: destdir = sys.argv[1] releasename = sys.argv[2] +release_dest = joinpath(destdir, 'release') +encumbered_dest = joinpath(destdir, 'encumbered') +release_dir = joinpath(release_dest, releasename) +encumbered_dir = joinpath(encumbered_dest, releasename) if exists(destdir): if not isdir(destdir): raise AttributeError, '%s exists, but is not a directory' % destdir - rmtree(destdir) - -release_dir = joinpath(destdir, 'release', releasename) -encumbered_dir = joinpath(destdir, 'encumbered', releasename) - -mkdir(destdir) -mkdir(destdir, 'release') -mkdir(destdir, 'encumbered') +else: + mkdir(destdir) + +if exists(release_dest): + if not isdir(release_dest): + raise AttributeError, \ + '%s exists, but is not a directory' % release_dest + rmtree(release_dest) + +if exists(encumbered_dest): + if not isdir(encumbered_dest): + raise AttributeError, \ + '%s exists, but is not a directory' % encumbered_dest + rmtree(encumbered_dest) + +mkdir(release_dest) +mkdir(encumbered_dest) mkdir(release_dir) mkdir(encumbered_dir) |