# - bof - #

<<'comment'
rm -rf ~/Arch_CreateYourOwn_ArchISO.sh; vim ~/Arch_CreateYourOwn_ArchISO.sh;
copy & paste this content
chmod +x ~/Arch_CreateYourOwn_ArchISO.sh; ~/./Arch_CreateYourOwn_ArchISO.sh;

ssh-keygen -R 192.168.122.1
cd ~/; curl -O http://192.168.1.200/Programs/Linux.Img/Linux_Arch.Img/Arch_Install/Ermanno_Arch.Ins/CreateYourOwn_ArchISO.Ins/Arch_CreateYourOwn_ArchISO.sh;
chmod +x ~/Arch_CreateYourOwn_ArchISO.sh; ~/./Arch_CreateYourOwn_ArchISO.sh;
~/./Arch_CreateYourOwn_ArchISO.sh;



# -  - #
# - When this error happen on ssh command - #
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# -  - #
# - Fixing this error - #
ssh-keygen -R "you server hostname or ip"
ssh-keygen -R 192.168.1.100;
ssh-keygen -R 192.168.1.200;
ssh-keygen -R 192.168.122.100;
ssh-keygen -R 192.168.122.200;


# -  - #
# - Documentation - #
https://www.youtube.com/watch?v=-yPhW5o1hNM
https://wiki.archlinux.org/title/archiso#Installing_packages

comment



pacmanf_=./pacman.conf;
x8664f_=./packages.x86_64;
airootfs_=./airootfs/root/customize_airootfs.sh;



# :a
# -  - #
# - System update & Install archiso package - #
sudo pacman -Syu --noconfirm; sudo pacman -Syyuu --noconfirm;
sudo pacman -S archiso mkinitcpio-archiso --noconfirm;

# -  - #
# - Clear system cache - #
sudo pacman -Scc --noconfirm;

echo '';
read -t 5 -p "System updated...";
echo '';

cd ~/Downloads;
sudo rm -rf ISOBuild;
mkdir -p ISOBuild; cd ISOBuild;
cp -r /usr/share/archiso/configs/releng/ .;
cd releng;



# :b
# -  - #
# - Add packages to packages.x86_64 - #
# vim pacages.x86_64;
echo 'Modifying '$pacmanf_'...';
sed -i '39 i ILoveCandy' $pacmanf_;


# :c
# -  - #
# - Add packages to packages.x86_64 - #
# vim pacages.x86_64;
echo 'Modifying '$x8664f_'...';

echo '' >> $x8664f_;
echo 'acpi' >> $x8664f_;
echo 'acpi_call' >> $x8664f_;
echo 'adapta-gtk-theme' >> $x8664f_;
echo 'alsa-utils' >> $x8664f_;
echo 'arc-gtk-theme' >> $x8664f_;
echo 'arc-icon-theme' >> $x8664f_;
echo 'archlinux-wallpaper' >> $x8664f_;
echo 'audacious' >> $x8664f_;
echo 'bash-completion' >> $x8664f_;
echo 'binutils' >> $x8664f_;
echo 'bleachbit' >> $x8664f_;
echo 'bluez' >> $x8664f_;
echo 'bluez-utils' >> $x8664f_;
echo 'bpytop' >> $x8664f_;
echo 'brasero' >> $x8664f_;
echo 'calamares' >> $x8664f_;
echo 'clementine' >> $x8664f_;
echo 'curl' >> $x8664f_;
echo 'cups' >> $x8664f_;
echo 'cups-pdf' >> $x8664f_;
echo 'dialog' >> $x8664f_;
echo 'dnsutils' >> $x8664f_;
echo 'dolphin' >> $x8664f_;
echo 'evince' >> $x8664f_;
echo 'fakeroot' >> $x8664f_;
echo 'file-roller' >> $x8664f_;
echo 'filelight' >> $x8664f_;
echo 'filezilla' >> $x8664f_;
echo 'firefox' >> $x8664f_;
echo 'gcc' >> $x8664f_;
echo 'gedit' >> $x8664f_;
echo 'geeqie' >> $x8664f_;
echo 'gimp' >> $x8664f_;
echo 'git' >> $x8664f_;
echo 'gnome-calculator' >> $x8664f_;
echo 'gnome-disk-utility' >> $x8664f_;
echo 'gnome-multi-writer' >> $x8664f_;
echo 'gnome-packagekit' >> $x8664f_;
echo 'gnome-terminal' >> $x8664f_;
echo 'gnome-system-monitor' >> $x8664f_;
echo 'gparted' >> $x8664f_;
echo 'gpicview' >> $x8664f_;
echo 'grub-customizer' >> $x8664f_;
echo 'gtkmm3' >> $x8664f_;
echo 'gvfs' >> $x8664f_;
echo 'gvfs-smb' >> $x8664f_;
echo 'htop' >> $x8664f_;
echo 'hplip' >> $x8664f_;
echo 'inetutils' >> $x8664f_;
echo 'kpat' >> $x8664f_;
echo 'libcups' >> $x8664f_;
echo 'libreoffice' >> $x8664f_;
echo 'lightdm' >> $x8664f_;
echo 'lightdm-gtk-greeter' >> $x8664f_;
echo 'lightdm-gtk-greeter-settings' >> $x8664f_;
echo 'linux-headers' >> $x8664f_;
echo 'make' >> $x8664f_;
echo 'man' >> $x8664f_;
echo 'mesa' >> $x8664f_;
#echo 'mysql-clients' >> $x8664f_;
echo 'nano' >> $x8664f_;
echo 'nautilus-share' >> $x8664f_;
echo 'neofetch' >> $x8664f_;
echo 'netctl' >> $x8664f_;
echo 'net-tools' >> $x8664f_;
echo 'networkmanager' >> $x8664f_;
echo 'network-manager-applet' >> $x8664f_;
echo 'nmap' >> $x8664f_;
echo 'noto-fonts' >> $x8664f_;
echo 'ntfs-3g' >> $x8664f_;
echo 'nvidia' >> $x8664f_;
echo 'nvidia-utils' >> $x8664f_;
echo 'os-prober' >> $x8664f_;
#echo 'paru' >> $x8664f_;
echo 'papirus-icon-theme' >> $x8664f_;
echo 'pavucontrol' >> $x8664f_;
echo 'pinta' >> $x8664f_;
echo 'plank' >> $x8664f_;
echo 'postgresql' >> $x8664f_;
echo 'powertop' >> $x8664f_;
echo 'pulseaudio' >> $x8664f_;
echo 'pulseaudio-alsa' >> $x8664f_;
echo 'pulseaudio-bluetooth' >> $x8664f_;
echo 'python' >> $x8664f_;
echo 'p7zip' >> $x8664f_;
echo 'samba' >> $x8664f_;
echo 'screenfetch' >> $x8664f_;
echo 'simple-scan' >> $x8664f_;
echo 'smplayer' >> $x8664f_;
echo 'spectacle' >> $x8664f_;
echo 'sshfs' >> $x8664f_;
echo 'system-config-printer' >> $x8664f_;
echo 'thunar' >> $x8664f_;
echo 'tilix' >> $x8664f_;
echo 'tlp' >> $x8664f_;
echo 'transmission-gtk' >> $x8664f_;
echo 'tree' >> $x8664f_;
echo 'ttf-freefont' >> $x8664f_;
#echo 'ttf-ms-fonts' >> $x8664f_;
echo 'ttf-roboto' >> $x8664f_;
echo 'unrar' >> $x8664f_;
echo 'unzip' >> $x8664f_;
echo 'vlc' >> $x8664f_;
echo 'wget' >> $x8664f_;
echo 'whois' >> $x8664f_;
echo 'viewnior' >> $x8664f_;
echo 'xdg-utils' >> $x8664f_;
echo 'xdg-user-dirs' >> $x8664f_;
echo 'xfburn' >> $x8664f_;
echo 'xfce4' >> $x8664f_;
echo 'xfce4-goodies' >> $x8664f_;
echo 'xfce4-terminal' >> $x8664f_;
echo 'xf86-video-vesa' >> $x8664f_;
echo 'xf86-video-ati' >> $x8664f_;
echo 'xf86-video-intel' >> $x8664f_;
echo 'xf86-video-amdgpu' >> $x8664f_;
echo 'xf86-video-nouveau' >> $x8664f_;
echo 'xorg' >> $x8664f_;
echo 'xorg-server' >> $x8664f_;
echo 'xorg-xinit' >> $x8664f_;
#echo 'yay' >> $x8664f_;
echo 'yajl' >> $x8664f_;



echo 'Modifying '$airootfs_'...';
echo '' >> $airootfs_;
echo 'systemctl enable bluetooth' >> $airootfs_;
echo 'systemctl enable lightdm' >> $airootfs_;
echo 'systemctl enable NetworkManager' >> $airootfs_;
echo 'systemctl enable org.cups.cupsd' >> $airootfs_;
echo 'systemctl enable sshd' >> $airootfs_;
echo 'systemctl set-default graphical.target' >> $airootfs_;
echo 'systemctl set-default graphical.target' >> $airootfs_;
echo '' >> $airootfs_;
echo "echo 'exec startxfce4' > ~/.xinitrc;" >> $airootfs_;



<<'comment'
  systemctl enable zfs-import-cache \
                   zfs-mount \
                   zfs-import.target \
                   zfs.target;
  systemctl start  zfs.target;
comment



echo "";
echo "packages.x86_64 modified...";
read -t 5 -p "Creation of ArchISO will start soon...";
echo "";



# :d
# -  - #
# - Create WORK,ISOOUT folders - #
mkdir -p {WORK,ISOOUT};

# -  - #
# - Become root - #
# - Generate ISO - #
#su;
sudo mkarchiso -v -w WORK -o ISOOUT .;

#rm -rf ~/Arch_CreateYourOwn_ArchISO.sh;

echo "";
echo "ArchISO was created successfully...";
echo "";



<<'comment'
ssh-keygen -R 192.168.122.1
cd ~/Downloads; curl -O http://192.168.1.200/Programs/Linux.Img/Linux_Arch.Img/Arch_Install/Ermanno_Arch.Ins/CreateYourOwn_ArchISO.Ins/Arch_CreateYourOwn_ArchISO.sh;
chmod +x ~/Downloads/Arch_CreateYourOwn_ArchISO.sh; ~/Downloads/./Arch_CreateYourOwn_ArchISO.sh;
~/Downloads/./Arch_CreateYourOwn_ArchISO.sh;
comment



# - eof - #
