From 2fdceeb64a0912656dcfce709652bf2a68ef9277 Mon Sep 17 00:00:00 2001 From: Erik Ogenvik Date: Sun, 23 Nov 2014 10:14:25 +0100 Subject: [PATCH] Generate dist media in "media" directory. To make it fit better with the installed media layout. --- Makefile.am | 2 +- scripts/make_dist_media.py | 5 +++-- scripts/refresh-amber-media-dev.sh | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index ff81171aa..4448e4d31 100644 --- a/Makefile.am +++ b/Makefile.am @@ -35,7 +35,7 @@ releasemedia: #unpack to our temporary directory tar -jxf $(ourtempdir)/ember-media-$(VERSION).tar.bz2 -C $(ourtempdir) #move to the correct location - cp -r $(ourtempdir)/ember-media-$(VERSION)/* $(datadir)/ember/media/ + cp -ar $(ourtempdir)/ember-media-$(VERSION)/media $(datadir)/ember/media/ #clean up rm -rf $(ourtempdir) diff --git a/scripts/make_dist_media.py b/scripts/make_dist_media.py index 307515cae..6119bb04c 100755 --- a/scripts/make_dist_media.py +++ b/scripts/make_dist_media.py @@ -124,11 +124,12 @@ OPTIONS startdir = os.getcwd() src_media_dir = sys.argv[1] src_assets_dir = os.path.join(src_media_dir, "assets") - dest_media_dir = sys.argv[2] + #Place the resulting media in a subdirectory called "media" + dest_media_dir = os.path.join(sys.argv[2], "media") dest_assets_dir = os.path.join(dest_media_dir, "assets") if not os.path.exists(dest_media_dir): - os.mkdir(dest_media_dir) + os.makedirs(dest_media_dir) #First copy all directories that we should just provide unchanged copytree(os.path.join(src_media_dir, "assets_external/caelum"), os.path.join(dest_media_dir, "assets_external/caelum")) diff --git a/scripts/refresh-amber-media-dev.sh b/scripts/refresh-amber-media-dev.sh index 0a446f794..58108c60d 100755 --- a/scripts/refresh-amber-media-dev.sh +++ b/scripts/refresh-amber-media-dev.sh @@ -3,5 +3,5 @@ #updates amber with the needed media. This will only work for me (Erik Ogenvik) since only I know the password (as found in rsyncpasswd) #usage: ./refresh-amber-media-dev.sh -sh ${PWD}/scripts/make_dist_media.py $1 ${PWD}/media-dev 256 +scripts/make_dist_media.py $1 ${PWD}/media-dev 256 rsync -uavz --password-file rsyncpasswd media-dev/media/* amber.worldforge.org::media-dev-update