Created
November 2, 2015 16:49
-
-
Save tobi-pb/de7381e4fceecca0d5c7 to your computer and use it in GitHub Desktop.
Repack Magento Extension after running `tar xfvz extension.tgz`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'abstract.php'; | |
// | |
// | |
// PLEASE SET EDIT packages.xml and update md5 hashes! | |
class Mage_Shell_Archive extends Mage_Shell_Abstract | |
{ | |
public function run() | |
{ | |
if ( $this->getArg('source') && $this->getArg('dest') ) { | |
$archive = new Mage_Archive_Tar(); | |
$archive->pack( $this->getArg('source'), $this->getArg('dest'), true ); | |
//$archive = new Mage_Archive_Gz(); | |
//$archive->pack( $this->getArg('dest').'.tmp' , $this->getArg('dest') ); | |
} else { | |
echo $this->usageHelp(); | |
} | |
} | |
public function usageHelp() | |
{ | |
return <<<USAGE | |
Usage: php -f archive.php -- [options] | |
--source source dir | |
--dest dest modulename.tgz | |
USAGE; | |
} | |
} | |
$shell = new Mage_Shell_Archive(); | |
$shell->run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment