if ($param == "") { //from zero $ary = array($ary[0]); } if (!count($ary) || count($ary) > 1) { die("\nmultiple or none versions matched:\n\t" . implode("\n\t", $ary)); } $param = array_shift($ary); $param = substr($param, strlen($config['directory'])); } else { $param = -count($versions); } _migrate($param); break; case 'reset': drop_db(); create_db(); @unlink('./schema/schema.php'); _migrate(); break; case 'roll': $param = _argv(); if (!$param || (string) (int) $param != $param) { die("roll +/-step count, e.g. roll -4 or roll +2"); } _migrate((int) $param); break; case 'generate': $param = _argv(); if (!$param) { die("expecting generate [CamelCased or under_scored name]");
/** * \brief clean the env */ protected function tearDown() { rollback_repo(); // rollback the repo dir in ununpack.conf and wget_agent.conf to the default drop_db(); print "End up functional test for cp2foss \n"; }