/**
  * Copies configuration files from their dists as specified by installation
  * notes.
  *
  * @param string $installPath Opencart installation path.
  *
  * @return void
  * @since 0.1.0
  */
 public function copyConfigFiles($installPath)
 {
     $filesystem = new Filesystem();
     $configFiles = array('/config', '/admin/config');
     foreach ($configFiles as $configFile) {
         $source = $installPath . $configFile . '-dist.php';
         $target = $installPath . $configFile . '.php';
         if ($filesystem->exists($source)) {
             $filesystem->copy($source, $target);
         } else {
             DebugPrinter::log('File `%s` doesn\'t exist, though i am sure it should', $source);
         }
     }
 }
 /**
  * {@inheritdoc}
  *
  * @param InstalledRepositoryInterface $repo    Repository,
  * @param PackageInterface             $initial Current package.
  * @param PackageInterface             $target  Newly installed package.
  *
  * @return void
  * @since 0.1.0
  */
 public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target)
 {
     $installPath = $this->getInstallPath($target);
     $junglist = new FileJunglist();
     $junglist->saveModifiedFiles($installPath);
     DebugPrinter::log('Updating package');
     parent::update($repo, $initial, $target);
     DebugPrinter::log('Post-update file rotate');
     $junglist->rotateInstalledFiles($installPath);
     $junglist->restoreModifiedFiles($installPath);
     DebugPrinter::log('Finished updating');
 }