}
int command_collection::command_init(){
+ if(bskun == nullptr) return 569;//NULL POINTER
_show_config(INIT);
_chroot_init();
return 0;
}
int command_collection::command_install(){
+ if(bskun == nullptr ) return 444; //null pointer
QFileInfo finfo(bskun->get_pacman_conf());
if(!finfo.exists()){
_msg_err("Pacman config file '" + bskun->get_pacman_conf() + "' does not exist");
}
int command_collection::_chroot_init(){
+ if(bskun==nullptr)return 777; // nullptr
QDir dir(bskun->get_work_dir());
if(!dir.exists("airootfs")){
dir.mkpath("airootfs");
return 0;
}
int command_collection::command_run(){
+ if(bskun == nullptr) return 456;//nullptr
if(bskun->get_run_cmd() == ""){
_msg_err("Not found command....\nYou must set command!");
return 3;
}
int command_collection::_cleanup(){
+ if(bskun == nullptr) return 456;//nullptr
QDir bootkun(bskun->get_work_dir() + "/airootfs/boot");
if(bootkun.exists()){ //Delete initcpio image(s) and kernel(s)
QStringList nameFilters;
return 0;
}
int command_collection::_mkairootfs_sfs(){
+ if(bskun == nullptr) return 456;//nullptr
QDir workdirkun(bskun->get_work_dir());
if(!workdirkun.exists("airootfs")){
_msg_err("The path '" + bskun->get_work_dir() + "/airootfs' does not exist");
}
int command_collection::command_prepare(){
+ if(bskun == nullptr) return 456;//nullptr
_show_config(PREPARE);
_cleanup();
if(bskun->get_sfs_mode() == "sfs"){
_msg_success("Done!");
}
int command_collection::command_pkglist(){
+ if(bskun == nullptr) return 456;//nullptr
_msg_info("Creating a list of installed packages on live-enviroment...");
QString pacman_cmdkun="work_dir=\"" + bskun->get_work_dir() + "\"\ninstall_dir=\"" + bskun->get_install_dir() + "\"\narch=\""
+bskun->get_architecture() + "\"\npacman -Q --sysroot \"${work_dir}/airootfs\" > \"${work_dir}/iso/${install_dir}/pkglist.${arch}.txt\"";
}
}
int command_collection::command_iso(QString iso_name){
+ if(bskun == nullptr) return 456;//nullptr
img_name=iso_name;
QString _iso_efi_boot_args="";
QDir workd(bskun->get_work_dir());