summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2021-06-22 08:41:02 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2021-06-22 08:41:02 (GMT)
commitb411f1f7e671df22e0415e09d98679537630bfd7 (patch)
treed1ed711a07071b785debe37b60ed315904be9e4f
parente63ace15f82572967eb93d20948942ccd2ebf209 (diff)
downloadmisc-fred-b411f1f7e671df22e0415e09d98679537630bfd7.zip
misc-fred-b411f1f7e671df22e0415e09d98679537630bfd7.tar.gz
misc-fred-b411f1f7e671df22e0415e09d98679537630bfd7.tar.bz2
grand lyon: copy to current tenantHEADmain
-rwxr-xr-xgrandlyon/scripts/copy-wcs.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/grandlyon/scripts/copy-wcs.py b/grandlyon/scripts/copy-wcs.py
index 24a5831..e80b5b1 100755
--- a/grandlyon/scripts/copy-wcs.py
+++ b/grandlyon/scripts/copy-wcs.py
@@ -45,13 +45,7 @@ for object_type in ('carddefs', 'formdefs', 'workflows', 'categories', 'datasour
else:
print('missing source tenant')
sys.exit(1)
- if os.path.exists('/var/lib/wcs/%s' % dest_site):
- dest_base_dir = '/var/lib/wcs/%s' % dest_site
- elif os.path.exists('/var/lib/wcs/tenants/%s' % dest_site):
- dest_base_dir = '/var/lib/wcs/tenants/%s' % dest_site
- else:
- print('missing destination tenant')
- sys.exit(1)
+ dest_base_dir = get_publisher().app_dir
orig_dir = os.path.join('%s/%s/' % (orig_base_dir, object_type))
dest_dir = os.path.join('%s/%s/' % (dest_base_dir, object_type))
if not os.path.exists(orig_dir):