#!/usr/bin/env php * @package be.bastelstu.chat */ $packageXML = file_get_contents('package.xml'); preg_match('/(.*?)<\/version>/', $packageXML, $matches); echo "Building Tims Chat $matches[1]\n"; echo str_repeat("=", strlen("Building Tims Chat $matches[1]"))."\n"; echo <<\d{4}-\d{2}-\d{2}~', ''.date('Y-m-d').'', file_get_contents('package.xml'))); passthru('tar cvf be.bastelstu.chat.tar * --exclude=*.old --exclude=file --exclude=template --exclude=acptemplate --exclude=contrib', $code); if (file_exists('package.xml.old')) { file_put_contents('package.xml', file_get_contents('package.xml.old')); unlink('package.xml.old'); } if ($code != 0) exit($code); if (file_exists('file.tar')) unlink('file.tar'); if (file_exists('template.tar')) unlink('template.tar'); if (file_exists('acptemplate.tar')) unlink('acptemplate.tar'); foreach (glob('file/acp/be.bastelstu.chat.nodePush/lib/*.js') as $nodeFile) unlink($nodeFile); foreach (glob('file/js/*.js') as $jsFile) unlink($jsFile);