summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2012-10-03 17:08:10 -0500
committerDavid Lehman <dlehman@redhat.com>2012-10-04 20:33:51 -0500
commitc6c341e59fc029c85df281d9aca8ef3ad38af1e5 (patch)
tree4b65432984de8b5d368f0f66943ddb2dca47c754 /scripts
parent9e25d4c4c1d92b0e088760374a5e3f0992344f36 (diff)
downloadanaconda-c6c341e59fc029c85df281d9aca8ef3ad38af1e5.tar.gz
anaconda-c6c341e59fc029c85df281d9aca8ef3ad38af1e5.tar.xz
anaconda-c6c341e59fc029c85df281d9aca8ef3ad38af1e5.zip
Fix makeupdates to work for glade files in subdirs of spokes/ or hubs/.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/makeupdates12
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/makeupdates b/scripts/makeupdates
index 2ecf59982..6842eca82 100755
--- a/scripts/makeupdates
+++ b/scripts/makeupdates
@@ -137,11 +137,13 @@ def copyUpdatedFiles(tag, updates, cwd):
if file.endswith('.glade'):
# Some UI files should go under ui/<dir> where dir is the
# directory above the file.glade
- uidir = os.path.dirname(file).split(os.path.sep)[-1]
- if uidir in ["hubs", "spokes"]:
- install_to_dir(file, os.path.join(tmpupdates, "ui", uidir))
- else:
- install_to_dir(file, os.path.join(tmpupdates, "ui"))
+ dir_parts = os.path.dirname(file).split(os.path.sep)
+ g_idx = dir_parts.index("gui")
+ uidir = os.path.sep.join(dir_parts[g_idx+1:])
+ path_comps = [tmpupdates, "ui"]
+ if uidir:
+ path_comps.append(uidir)
+ install_to_dir(file, os.path.join(*path_comps))
elif file.startswith('pyanaconda/'):
# pyanaconda stuff goes into /tmp/updates/[path]
dirname = os.path.join(tmpupdates, os.path.dirname(file))