public function install(InstalledRepositoryInterface $repo, PackageInterface $package)
    {
        parent::install($repo, $package);
        foreach ($this->getSupportedHooks() as $gitHookName) {
            $installedHookFilePath = $this->getInstallPath($package) . DIRECTORY_SEPARATOR . $gitHookName;

            if (file_exists($installedHookFilePath)) {
                $hookDestinationPath = $this->getGitHooksPath() . DIRECTORY_SEPARATOR . $gitHookName;
                if (!copy($installedHookFilePath, $hookDestinationPath)) {
                    echo sprintf(
                        'GitHookInstallerPlugin failed to copy %s to %s!',
                        $installedHookFilePath,
                        $hookDestinationPath
                    );
                }
                chmod($hookDestinationPath, 0755);
            }
        }

        // clean up temporary data
        exec('rm -rf ' . $this->getHooksInstallationPath());
    }