diff --git a/archfi b/archfi index e6c0df0..410b8f5 100644 --- a/archfi +++ b/archfi @@ -14,6 +14,7 @@ apptitle="Arch Linux Fast Install (archfi) - Version: 2020.04.05.23.08.12 (GPLv3)" baseurl=https://raw.githubusercontent.com/MatMoul/archfi/master +cpl=0 skipfont="0" fspkgs="" @@ -859,6 +860,24 @@ installbase(){ pkgs="$pkgs $(echo $itm | sed 's/"//g')" done + if [[ ${cpl} == 1 ]]; then + sed -i '/^\s*$/d' /tmp/archfi-custom-package-list + sed -i '/^#/ d' /tmp/archfi-custom-package-list + options=() + while read pkg; do + options+=("${pkg}" "" on) + done < /tmp/archfi-custom-package-list + sel=$(whiptail --backtitle "${apptitle}" --title "Custom Package List" --checklist "" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ ! "$?" = "0" ]; then + return 1 + fi + for itm in $sel; do + pkgs="$pkgs $(echo $itm | sed 's/"//g')" + done + fi + clear echo "pacstrap /mnt ${pkgs}" pacstrap /mnt ${pkgs} @@ -1927,11 +1946,20 @@ while (( "$#" )); do --help) echo "archfi" echo "------" + echo "-cpl | --custom-package-list url Set custom package list url" echo "-sf | --skip-font Skip setfont from language files" echo "-efiX -efi0 : disable EFI, -efi1 efi inst, -efi2 efi hybrid inst" echo "-t | --test ghusername ghbranch Test archfi script and language" exit 0 ;; + -cpl | --custom-package-list) + curl -L ${2} > /tmp/archfi-custom-package-list + if [[ "$?" != "0" ]]; then + echo "Error downloading custom package list" + exit 0 + fi + cpl=1 + ;; -sf | --skip-font) skipfont=1;; -t | --test) wget -O archfi https://raw.githubusercontent.com/${2}/archfi/${3}/archfi diff --git a/samples/custompackagelist b/samples/custompackagelist new file mode 100644 index 0000000..0dd466c --- /dev/null +++ b/samples/custompackagelist @@ -0,0 +1,13 @@ +# This file is a sample of a custom package list that is available at the pacstrap step. +# Each line is a package but empty line and commented line is supported. + +# How to use : +# Store your own file on a web server +# Launch archfi with : +# archfi -cpl url_of_the_file + +# Some packages : +neofetch +nmon +lsusb +# base-devel