Skip to content

Instantly share code, notes, and snippets.

Created Nov 2, 2015
What would you like to do?
Repack Magento Extension after running `tar xfvz extension.tgz`
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
$shell = new Mage_Shell_Archive();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment