summaryrefslogtreecommitdiff
blob: b273c29855a073d4bf3799105dabed0c3eae1e40 (plain)
1
2
3
4
5
6
7
8
9
10
11
<?php
//	execute_command_with_env('Pre-installing baselayout', 'emerge baselayout', array_merge($prtg_cfgrt, array('USE' => 'build')));
//	TODO create make.conf, make.profile in target /etc
if (is_file(CACHE.'/system-'.$profile->id.'.tar.gz') && filemtime(CACHE.'/system-'.$profile->id.'.tar.gz') > filemtime($conf['pkgdir_root'].'/'.$profile->pkgdir.'/Packages')) {
	execute_command('Unpack cached base system', "tar -zxvf '".CACHE."/system-$profile->id.tar.gz' -C '$I'");
} else {
	execute_command_with_env('Install base system', 'emerge system', $prtg_cfgrt);
	execute_command('Cache base system for reuse', "tar -p --same-owner -czvf '$W/image.tar.gz' -C '$I' .");
	rename("$W/image.tar.gz", CACHE.'/system-'.$profile->id.'.tar.gz');
}
?>