#!/usr/bin/python2.7
# vim:filetype=python

import sys
import platform
import os.path

script_dir = os.path.dirname(__file__)
if platform.system() != 'Windows':
	if os.path.islink(__file__):
		script_dir = os.path.dirname(os.readlink(__file__))

# necessary to run panel migrator from sources
sys.path.extend(os.path.join(script_dir, name) for name in (
	'common', 'confixx-migrator', 'expand-api', 'expand-migrator', 'helm-migrator', 'helm3-migrator',
	'hosting-analyser', 'hosting-check', 'hsphere-migrator', 'pbas-migrator', 'plesk-api', 'plesks-migrator',
	'pmm-unix-migrator', 'poa-api', 'ppab-api', 'ppcpl-migrator', 'target-panel-plesk', 'target-panel-ppa',
	'target-panel-pvps', 'utils'
))

# include panel migrator modules into sys.path
sys.path.extend([os.path.join(script_dir, '..', 'lib', 'python2.7', 'site-packages')])

from parallels.common.cli.migration_cli import run

if __name__ == '__main__':
	sys.exit(run(script_dir, sys.argv[1:]))