7
# script filename (usually with path)
8
current_file = inspect.getfile(inspect.currentframe())
9
current_folder = os.path.dirname(os.path.abspath(current_file))
10
os.chdir(current_folder)
12
charms_folders = glob.glob('../charms/trusty/*')
13
helper_utils = ['update_helpers.py', 'update_hosts.py',
14
'update_domain.py', 'azure/add-cf-ports.py']
16
# XXX: we may want to replace this process with
17
# a git submodule. The downside to that is that the charms
18
# as pulled directly from github would need an additional step
20
for charm_folder in charms_folders:
21
charm_helper_folder = os.path.join(charm_folder, 'hooks', 'helpers')
22
if os.path.exists(charm_helper_folder):
23
shutil.rmtree(charm_helper_folder)
24
print "Copying helpers to %s." % charm_helper_folder
25
shutil.copytree(current_folder, charm_helper_folder)
26
for util_file in helper_utils:
27
os.remove(os.path.join(charm_helper_folder, util_file))