mkalteriso_option="${mkalteriso_option} -x"
fi
if [[ "${noaur}" = false ]]; then
- mkalteriso_option="${mkalteriso_option} -s tdn"
+ mkalteriso_option="${mkalteriso_option} --aur"
fi
prepare_rebuild
for _aur_pkg in ${*}; do
#echo "cd ~ ; rm -rf "${_aur_pkg}"; git clone https://aur.archlinux.org/${_aur_pkg}.git" > "/aurbuild_temp/aur_prepare.sh"
#chmod 777 "/aurbuild_temp/aur_prepare.sh"
- echo "yay -S ${_aur_pkg} -y --nocleanmenu --nodiffmenu --noeditmenu --noupgrademenu"
+ echo "yay -S ${_aur_pkg} -y --nocleanmenu --nodiffmenu --noeditmenu --noupgrademenu" > "/aurbuild_temp/aur_prepare.sh"
+ chmod 777 "/aurbuild_temp/aur_prepare.sh"
sudo -u aurbuild "/aurbuild_temp/aur_prepare.sh"
done
void build_setting::set_wsl(bool blkun){
enable_wsl=blkun;
}
+bool build_setting::get_aur(){
+ return enable_aur;
+}
+void build_setting::set_aur(bool bl){
+ enable_aur=bl;
+}
bool get_debug_mode();
void set_wsl(bool);
bool get_wsl();
+ void set_aur(bool);
+ bool get_aur();
private:
bool quiet;
QString architecture;
QStringList command_args;
bool debug_mode;
bool enable_wsl;
+ bool enable_aur;
signals:
};
command_collection::command_collection(QObject *parent) : QObject(parent)
{
-umount_kun=false;
+umount_kun_old=false;
}
void command_collection::set_build_setting(build_setting* bss){
bskun=bss;
if(!dir.exists("airootfs")){
dir.mkpath("airootfs");
}
+ if(bskun->get_aur()){
+
+ }
if(bskun->get_wsl()){
_pacman("base base-devel git");
_msg_success("Done!");
return 0;
}
-int command_collection::_mount_airootfs(){
- umount_kun=true;
+int command_collection::_mount_airootfs_old(){
+ umount_kun_old=true;
QDir workkun(bskun->get_work_dir());
if(!workkun.exists("mnt/airootfs")){
workkun.mkpath("mnt/airootfs");
return 0;
}
-void command_collection::_umount_airootfs(){
+void command_collection::_umount_airootfs_old(){
_msg_info("Unmounting '" + bskun->get_work_dir() + "/mnt/airootfs'");
QString umount_cmdrun="umount -d \"" + bskun->get_work_dir() + "/mnt/airootfs\"";
_msg_info(umount_cmdrun);
system(rmdirkun.toUtf8().data());
}
-void command_collection::force_umount(){
- if(umount_kun){
- _umount_airootfs();
+void command_collection::force_umount_old(){
+ if(umount_kun_old){
+ _umount_airootfs_old();
}
}
-int command_collection::_mkairootfs_img(){
+int command_collection::_mkairootfs_img_old(){
int ret;
QDir workdirkun(bskun->get_work_dir());
if(!workdirkun.exists("airootfs")){
return 5;
}
_msg_success("Done!");
- ret=_mount_airootfs();
+ ret=_mount_airootfs_old();
if(ret != 0){
return ret;
}
return 7;
}
_msg_success("Done!");
- _umount_airootfs();
+ _umount_airootfs_old();
workdirkun.mkpath("iso/" + bskun->get_install_dir() + "/" + bskun->get_architecture());
_msg_info("Creating SquashFS image, this may take some time...");
QString mksquashfskun="mksquashfs \"" + workdirstr + "/airootfs.img\" \"" + workdirstr + "/iso/" + bskun->get_install_dir() + "/" + bskun->get_architecture()
return 2;
}
}else{
- if(_mkairootfs_img()!=0){
+ if(_mkairootfs_img_old()!=0){
return 3;
}
}
int command_pkglist();
int command_tarball(QString);
int command_iso(QString);
- void force_umount();
+ void force_umount_old();
private:
build_setting* bskun=nullptr;
- bool umount_kun;
+ bool umount_kun_old;
enum show_config_type{
INIT=0,
INSTALL=1,
void _mksignature();
void _checksum_common(QString) ;
void _msg_infodbg(QString);
- int _mkairootfs_img();
- int _mount_airootfs();
+ int _mkairootfs_img_old();
+ int _mount_airootfs_old();
template<class... LNKUN> int max_lenkun(LNKUN... args);
template<class... LNKUNS> int max_lenkun_QString(LNKUNS... args);
template<class... SHOWVALKUN> void show_conf_l(int maxkun,void (*do_msgshow)(QString),SHOWVALKUN... txtargkun);
template<class... SHOWVALKUN> void show_conf_l(void (*do_msgshow)(QString),SHOWVALKUN... txtargkun);
- void _umount_airootfs();
+ void _umount_airootfs_old();
template<class... SHOWVALKUN> void show_conf_dkun(void (*do_msgshow)(QString),SHOWVALKUN... argkun);
QString img_name;
static void stubkun(QString);
AppMain m(0,&a);
QTimer::singleShot(0,&m,SLOT(run()));
int retkun= a.exec();
- m.cmd_collect.force_umount();
+ m.cmd_collect.force_umount_old();
return retkun;
}
bool isroot(){
build_setting_obj.set_quiet(true);
build_setting_obj.set_use_gpg_key(false);
build_setting_obj.set_wsl(false);
+ build_setting_obj.set_aur(false);
time_t now;
struct tm *ts;
char buf[80];
QCommandLineOption option_verbose("v","verbose");
QCommandLineOption option_debug("d","debug");
QCommandLineOption option_x("x","x");
+ QCommandLineOption option_aur(QStringList() << "aur","Enable aur");
QCommandLineOption option_wsl(QStringList() << "wsl","for wsl");
QCommandLineOption option_gpg_key("g","gpg key","gpg key");
QCommandLineOption option_help1(QStringList() << "h" << "help" << "?","help");
parser.addOptions({option_Architecture,option_PACKAGE,option_command,option_file_pacman,option_work_dir
,option_out_dir,option_sfs_mode,option_sfs_comp,option_sfs_special_option,option_iso_label,option_iso_publisher,option_iso_application,option_install_dir
- ,option_gpg_key});
+ ,option_gpg_key,option_aur});
parser.addOption(option_verbose);
parser.addOption(option_x);
parser.addOption(option_commands);
if(parser.isSet(option_wsl)){
build_setting_obj.set_wsl(true);
}
+ if(parser.isSet(option_aur)){
+ build_setting_obj.set_aur(true);
+ }
build_setting_obj.set_command_args(parser.positionalArguments());
cmd_collect.set_build_setting(&build_setting_obj);
if(parser.positionalArguments().at(0)=="init"){