remove bad downloads

This commit is contained in:
dmacias72 2016-04-24 23:19:51 -06:00
parent 8969459ae1
commit 4c90d054a1

View File

@ -91,10 +91,13 @@ foreach ($pkg_cfg as $pkg_name => $pkg_pref) { // get preferences for each packa
if (file_check_sha1($pkg_file, $pkg_sha1))
logger($pkg_gitname.' package downloaded sucessfully!', $argq);
else
else{
if(is_file($pkg_file))
unlink($pkg_file);
logger($pkg_gitname.' package download failed!', $argq);
}
}
}
if (!$pkg_install_status) {
$pkg_msg = 'Installing';
$pkg_cmd = 'upgradepkg --install-new '.$pkg_path.$pkg_name.'* 2>&1';