Merge pull request 'make dialog and new bootloaders into main' (#7) from dialog into main

Reviewed-on: https://git.getcryst.al/crystal/citrine/pulls/7
pull/3/head
Matt Compton 3 years ago
commit 62357aba52

@ -14,6 +14,24 @@ prompt() {
read response read response
} }
# ---------------------------------
yn=""
yesno() {
dialog --title Citrine --yesno "$@" 10 80
yn=$?
}
dumptitle=""
dump() {
dialog --title "${dumptitle}" --no-collapse --msgbox "$@" 0 0
}
msgdat=""
msgbox(){
msgdat=$(dialog --title Citrine --inputbox "$@" --stdout 10 80)
}
# --------------------------
if [[ "$EUID" != "0" ]]; then if [[ "$EUID" != "0" ]]; then
err "Run as root" err "Run as root"
exit 1 exit 1
@ -24,10 +42,12 @@ pacman-key --init
pacman-key --populate archlinux pacman-key --populate archlinux
pacman-key --populate crystal pacman-key --populate crystal
prompt "Do you need a keyboard layout other than standard US? (y/N)" yesno "Do you need a keyboard layout other than QWERTY US?"
KBD="$response" KBD="$yn"
echo "KBD=$response" echo "KBD=$KBD"
if [[ "$KBD" == "y" || "$KBD" == "Y" ]]; then
# TODO: layout select in dialog
if [[ "$KBD" == "0" || "$KBD" == "0" ]]; then
prompt "We're going to show the list of keymaps in less. Do you know how to exit less? (Y/n)" prompt "We're going to show the list of keymaps in less. Do you know how to exit less? (Y/n)"
UL="$response" UL="$response"
if [[ "$UL" == "n" ]]; then if [[ "$UL" == "n" ]]; then
@ -44,23 +64,25 @@ fi
clear clear
inf "Disks:" yesno "Would you like to partition manually?"
fdisk -l | grep Disk | grep sectors --color=never echo "PMODE=$yn"
PMODE="$yn"
prompt "Would you like to partition manually? (y/N)" dumptitle="System Disks"
echo "PMODE=$response" diskdat="$(fdisk -l | grep Disk | grep sectors --color=never)"
PMODE="$response" dump "$diskdat"
MANUAL="no" MANUAL="no"
DISK="" DISK=""
if [[ "$PMODE" == "y" ]]; then if [[ "$PMODE" == "0" ]]; then
MANUAL="yes" MANUAL="yes"
else else
prompt "Install target WILL BE FULLY WIPED" msgbox "Install target WILL BE FULLY WIPED"
echo "DISK=$response" echo "DISK=$msgdat"
DISK="$response" DISK="$msgdat"
if ! fdisk -l ${DISK}; then if ! fdisk -l ${DISK}; then
err "Seems like $DISK doesn't exist. Did you typo?" dumptitle="ERROR"
dump "Seems like $DISK doesn't exist. Did you typo?"
exit 1 exit 1
fi fi
fi fi
@ -81,16 +103,21 @@ else
fi fi
echo "EFI=$EFI" echo "EFI=$EFI"
dumptitle="Please confirm"
if [[ "$EFI" == "yes" ]]; then if [[ "$EFI" == "yes" ]]; then
prompt "This PC seems to have booted with UEFI. Press enter to confirm" dump "This PC seems to *have* booted with UEFI. Press enter to confirm, or Control+C to cancel"
else else
prompt "This PC seems to *not* have booted with UEFI. Press enter to aknowledge, or press Control+C if this seems wrong." dump "This PC seems to *not* have booted with UEFI. Press enter to aknowledge, or press Control+C if this seems wrong."
fi fi
inf "Setting system clock via network" inf "Setting system clock via network"
timedatectl set-ntp true timedatectl set-ntp true
if [[ "$MANUAL" == "no" ]]; then if [[ "$MANUAL" == "no" ]]; then
dumptitle="CAUTION!"
dump "This is your last chance to avoid deleting critical data on $DISK. If you're not sure, press Control+C NOW!"
echo "Partitioning disk" echo "Partitioning disk"
if [[ "$EFI" == "yes" ]]; then if [[ "$EFI" == "yes" ]]; then
parted ${DISK} mklabel gpt --script parted ${DISK} mklabel gpt --script
@ -109,8 +136,8 @@ if [[ "$MANUAL" == "no" ]]; then
mkfs.vfat ${DISK}p1 mkfs.vfat ${DISK}p1
mkfs.ext4 ${DISK}p2 mkfs.ext4 ${DISK}p2
mount ${DISK}p2 /mnt mount ${DISK}p2 /mnt
mkdir -p /mnt/efi mkdir -p /mnt/boot/efi
mount ${DISK}p1 /mnt/efi mount ${DISK}p1 /mnt/boot/efi
else else
inf "Initializing ${DISK} as NVME MBR" inf "Initializing ${DISK} as NVME MBR"
mkfs.ext4 ${DISK}p1 mkfs.ext4 ${DISK}p1
@ -119,11 +146,11 @@ if [[ "$MANUAL" == "no" ]]; then
else else
if [[ "$EFI" == "yes" ]]; then if [[ "$EFI" == "yes" ]]; then
inf "Initializing ${DISK} as EFI" inf "Initializing ${DISK} as EFI"
mkfs.vfat ${DISK}1 mkfs.vfat -F32 ${DISK}1
mkfs.ext4 ${DISK}2 mkfs.ext4 ${DISK}2
mount ${DISK}2 /mnt mount ${DISK}2 /mnt
mkdir -p /mnt/efi mkdir -p /mnt/boot/efi
mount ${DISK}1 /mnt/efi mount ${DISK}1 /mnt/boot/efi
else else
inf "Initializing ${DISK} as MBR" inf "Initializing ${DISK} as MBR"
mkfs.ext4 ${DISK}1 mkfs.ext4 ${DISK}1
@ -132,30 +159,34 @@ if [[ "$MANUAL" == "no" ]]; then
fi fi
else else
clear clear
inf "You have chosen manual partitioning."
inf "We're going to drop to a shell for you to partition, but first, PLEASE READ these notes." dumptitle="Read carefully!"
inf "Before you exit the shell, make sure to format and mount a partition for / at /mnt"
dump "You have chosen manual partitioning.\
We're going to drop to a shell for you to partition, but first, PLEASE READ these notes.\
Before you exit the shell, make sure to format and mount a partition for / at /mnt."
if [[ "$EFI" == "yes" ]]; then if [[ "$EFI" == "yes" ]]; then
mkdir -p /mnt/efi mkdir -p /mnt/boot/efi
inf "Additionally, since this machine was booted with UEFI, please make sure to make a 200MB or greater partition"
inf "of type VFAT and mount it at /mnt/efi" dump "Additionally, since this machine was booted with UEFI, please make sure to make a 200MB or greater partition\
of type VFAT and mount it at /mnt/boot/efi"
else else
inf "Please give me the full path of the device you're planning to partition (needed for bootloader installation later)" msgbox "Please give me the full path of the device you're planning to partition (needed for bootloader installation later)\
inf "Example: /dev/sda" .. Example: /dev/sda"
printf ": " DISK="${msgdat}"
read DISK
fi fi
CONFDONE="NOPE" CONFDONE="NOPE"
dumptitle="Citrine"
while [[ "$CONFDONE" == "NOPE" ]]; do while [[ "$CONFDONE" == "NOPE" ]]; do
inf "Press enter to go to a shell." dump "Press enter a shell. (ZSH)"
read zsh
bash yesno "All set (and partitions mounted?)"
prompt "All set (and partitions mounted?) (y/N)" echo "STAT=$yn"
echo "STAT=$response" STAT="$yn"
STAT="$response" if [[ "$STAT" == "0" ]]; then
if [[ "$STAT" == "y" ]]; then
if ! findmnt | grep /mnt; then if ! findmnt | grep /mnt; then
err "Are you sure you've mounted the partitions?" err "Are you sure you've mounted the partitions?"
@ -170,43 +201,261 @@ inf "Verifying network connection"
ping -c 1 getcryst.al ping -c 1 getcryst.al
if [[ ! "$?" == "0" ]]; then if [[ ! "$?" == "0" ]]; then
err "It seems like this system can't reach the internet. Exiting." dumptitle="Error!"
dump "It seems like this system can't reach the internet. Failing here."
umount -l /mnt
exit 1 exit 1
fi fi
inf "Setting up base Crystal System" inf "Setting up base Crystal System"
crystalstrap /mnt base linux linux-firmware systemd-sysvcompat networkmanager grub crystal-grub-theme man-db man-pages texinfo micro sudo curl archlinux-keyring neofetch crystalstrap /mnt base linux linux-firmware systemd-sysvcompat networkmanager man-db man-pages texinfo micro sudo curl archlinux-keyring neofetch
if [[ ! "$?" == "0" ]]; then if [[ ! "$?" == "0" ]]; then
inf "CrystalStrap had some error. Retrying." inf "CrystalStrap had some error. Retrying."
crystalstrap /mnt base linux linux-firmware systemd-sysvcompat networkmanager grub crystal-grub-theme man-db man-pages texinfo micro sudo curl archlinux-keyring neofetch crystalstrap /mnt base linux linux-firmware systemd-sysvcompat networkmanager man-db man-pages texinfo micro sudo curl archlinux-keyring neofetch
fi fi
if [[ "$EFI" == "yes" ]]; then if [[ "$EFI" == "yes" ]]; then
inf "Installing EFI support package" inf "Installing EFI support package"
crystalstrap /mnt efibootmgr crystalstrap /mnt efibootmgr refind
else
inf "Installing Syslinux bootloader"
crystalstrap /mnt syslinux
fi fi
# Grub theme genfstab -U /mnt > /mnt/etc/fstab
sed -i 's/\/path\/to\/gfxtheme/\/usr\/share\/grub\/themes\/crystal\/theme.txt/g' /mnt/etc/default/grub
sed -i 's/#GRUB_THEME/GRUB_THEME/g' /mnt/etc/default/grub
cp /usr/bin/continue.sh /mnt/. clear
chmod +x /mnt/continue.sh
genfstab -U /mnt > /mnt/etc/fstab TZ="/usr/share/place/holder"
while [[ ! -f $TZ ]]; do
msgbox "Pick a time zone (Format: America/New_York, Europe/London, etc)"
PT="$msgdat"
TZ="/usr/share/zoneinfo/${PT}"
done
arch-chroot /mnt ln-sf $TZ /etc/localtime
inf "Set TZ to ${TZ}"
inf "Syncing hardware offset"
arch-chroot /mnt hwclock --systohc
echo "en_US.UTF-8 UTF-8" >> /mnt/etc/locale.gen
echo "LANG=en_US.UTF-8" > /mnt/etc/locale.conf
clear
yesno "Do you need more locales than just en_US?"
echo "More=$yn"
More="$yn"
if [[ "$MORE" == "0" ]]; then
msgbox "Preferred editor"
PRGRM="$msgdat"
echo "PGRM=$msgdat"
if [[ -x "$(command -v ${PGRM})" ]]; then
inf "Attempting to install ${PGRM}"
pacman -S ${PGRM} --noconfirm
fi
dumptitle="Read carefully."
dump "When we open the file, please remove the leading # before any locales you need.\
Then, save and exit."
${PGRM} /mnt/etc/locale.gen
fi
inf "Generating selected locales."
arch-chroot /mnt locale-gen
echo
echo
inf "en_US was set as system primary."
inf "After install, you can edit /etc/locale.conf to change the primary if desired."
inf "Press enter"
prompt ""
if [[ "$KBD" == "y" || "$KBD" == "Y" ]]; then if [[ "$KBD" == "y" || "$KBD" == "Y" ]]; then
echo ${KMP} >> /mnt/keymap echo "KEYMAP=${KMP}" > /mnt/etc/vconsole.conf
fi
clear
msgbox "Enter the system hostname"
HOSTNAME="$msgdat"
echo ${HOSTNAME} > /mnt/etc/hostname
echo "127.0.0.1 localhost" > /mnt/etc/hosts
yesno "Would you like IPV6?"
IPS="$yn"
if [[ "$IPS" == "0" ]]; then
echo "::1 localhost" >> /mnt/etc/hosts
fi fi
echo "127.0.0.1 ${HOSTNAME}.localdomain ${HOSTNAME}" >> /mnt/etc/hosts
clear
inf "Set a password for root"
done="nope"
while [[ "$done" == "nope" ]]; do
arch-chroot /mnt passwd
if [[ "$(echo $?)" == "0" ]]; then
done="yep"
fi
done
msgbox "Your username"
UN="$msgdat"
arch-chroot /mnt useradd -m ${UN}
arch-chroot /mnt usermod -aG wheel ${UN}
inf "Set password for ${UN}"
done="nope"
while [[ "$done" == "nope" ]]; do
arch-chroot /mnt passwd ${UN}
if [[ "$(echo $?)" == "0" ]]; then
done="yep"
fi
done
echo >> /mnt/etc/sudoers
echo "# Enabled by Crystalinstall (citrine)" >> /mnt/etc/sudoers
echo "%wheel ALL=(ALL) ALL" >> /mnt/etc/sudoers
if [[ "$EFI" == "yes" ]]; then if [[ "$EFI" == "yes" ]]; then
touch /mnt/efimode root="$(findmnt -n -o SOURCE /mnt/ | awk 'BEGIN { FS = "/" }; { print $3 }')"
arch-chroot /mnt refind-install
echo '"Crystal Linux" "rw root=/dev/placeholder"' > /mnt/boot/refind_linux.conf
sed -i "s/placeholder/$root/" /mnt/boot/refind_linux.conf
else
arch-chroot /mnt curl https://git.getcryst.al/crystal/Syslinux_install_script/raw/branch/master/syslinux-install_update -o /usr/bin/syslinux-install_update
arch-chroot /mnt syslinux-install_update -i -a -m
fi
arch-chroot /mnt systemctl enable NetworkManager
arch-chroot pacman-key --init
arch-chroot pacman-key --populate archlinux
arch-chroot pacman-key --populate crystal
clear
yesno "Would you like to install a DE/WM profile?"
echo "DEP=$yn"
DEP="$yn"
arch-chroot /mnt pacman -Sy --quiet --noconfirm
if [[ "$DEP" == "0" ]]; then
inf "--- Desktop Environments ---"
inf "- Budgie"
inf "- Cinnamon"
inf "- Deepin"
inf "- Enlightenment (note: very DIY. Read Arch Wiki)"
inf "- GNOME"
# Flashback seems to need some work
#inf "- (GNOME) Flashback"
inf "- KDE"
inf "- LXDE"
inf "- LXQt"
inf "- Mate"
inf "- Cutefish"
inf "- Xfce"
inf "- UKUI (note: very poorly documented. In english, anyway)"
inf "(We'll add more as people ask)"
inf "Please enter exactly as shown."
prompt ""
echo "DE=$response"
DE="$response"
DM=""
case "$DE" in
"Budgie" | "budgie")
arch-chroot /mnt pacman -S --quiet --noconfirm budgie-desktop gnome
DM="gdm"
;;
"Cinnamon" | "cinnamon")
arch-chroot /mnt pacman -S --quiet --noconfirm cinnamon
DM="gdm"
;;
"Deepin" | "deepin")
arch-chroot /mnt pacman -S --quiet --noconfirm deepin deepin-extra
DM="lightdm"
;;
"Gnome" | "GNOME" | "gnome")
arch-chroot /mnt pacman -S --quiet --noconfirm gnome gnome-extra chrome-gnome-shell
DM="gdm"
;;
"KDE" | "Kde" | "kde")
arch-chroot /mnt pacman -S --quiet --noconfirm plasma kde-applications sddm
DM="sddm"
;;
"LXDE" | "lxde" | "Lxde")
arch-chroot /mnt pacman -S --quiet --noconfirm lxde
DM="lxdm"
;;
"LXQt" | "lxqt" | "Lxqt" | "LXQT")
arch-chroot /mnt pacman -S --quiet --noconfirm lxqt breeze-icons xorg
DM="sddm"
;;
"Mate" | "mate")
arch-chroot /mnt pacman -S --quiet --noconfirm mate mate-extra mate-applet-dock mate-applet-streamer
DM="gdm"
;;
"Xfce" | "xfce")
arch-chroot /mnt pacman -S --quiet --noconfirm xfce4 xfce4-goodies
DM="sddm"
;;
"Cutefish" | "cutefish")
arch-chroot /mnt pacman -S --quiet --noconfirm cutefish
DM="sddm"
;;
"Enlightenment" | "enlightenment")
arch-chroot /mnt pacman -S --quiet --noconfirm enlightenment terminology
;;
esac
if [[ "$DM" == "" ]]; then
inf "Your selected DE/WM doesn't have a standard display manager. Enter one of the below names, or leave blank for none"
inf "- gdm"
inf "- sddm"
inf "- lightdm (you'll need a greeter package. See Arch Wiki)"
inf "- (you can type another Arch package name if you have one in mind)"
inf "- [blank] for none"
prompt ""
ND="$response"
echo "ND=$ND"
if [[ "$ND" != "" ]]; then
inf "Ok, we'll install $ND"
DM="$ND"
arch-chroot /mnt pacman -S --quiet --noconfirm $DM
else
inf "Ok, not installing a display manager."
fi
else else
echo ${DISK} > /mnt/diskn arch-chroot /mnt pacman -S --quiet --noconfirm $DM
fi
if [[ "$DM" != "" ]]; then
prompt "Would you like to enable ${DM} for ${DE}? (Y/n)"
useDM="$response"
if [[ "$useDM" != "n" ]]; then
arch-chroot /mnt systemctl enable ${DM}
if [[ "$DE" == "Deepin" ]]; then
sed -i 's/lightdm-gtk-greeter/lightdm-deepin-greeter/g' /mnt/etc/lightdm/lightdm.conf
fi
fi
fi
fi fi
arch-chroot /mnt /continue.sh 2>&1 | tee /mnt/var/log/citrine.chroot.log prompt "Would you like to add more packages? (Y/n)"
rm /mnt/continue.sh MP="$response"
if [[ "$MP" != "n" ]]; then
prompt "Would you like to use a URL to a package list? (Y/n)"
OL="$response"
if [[ "$OL" == "n" ]]; then
prompt "Write package names"
PKGNS="$response"
inf "Installing: $PKGNS"
arch-chroot /mnt ame -S ${PKGNS}
else
prompt "URL to package list"
SRC="$response"
PKGS="$(curl ${SRC})"
for PKG in PKGS; do
arch-chroot /mnt ame -S ${PKG}
done
fi
fi
inf "Installation should now be complete." inf "Installation should now be complete."

@ -14,11 +14,31 @@ prompt() {
read response read response
} }
# ---------------------------------
yn=""
yesno() {
dialog --title Citrine --yesno "$@" --stdout 10 80
yn=$(echo "?")
}
dumptitle=""
dump() {
dialog --title "${dumptitle}" --no-collapse --msgbox "$@" 0 0
}
msgdat=""
msgbox(){
msgdat=$(dialog --title Citrine --inputbox "$@" --stdout 10 80)
}
# --------------------------
clear clear
# TODO: How might we make a list select of timezones?
TZ="/usr/share/LMAO/XD" TZ="/usr/share/LMAO/XD"
while [[ ! -f $TZ ]]; do while [[ ! -f $TZ ]]; do
prompt "Pick a time zone (Format: America/New_York , Europe/London, etc)" msgbox "Pick a time zone (Format: America/New_York , Europe/London, etc)"
PT="$response" PT="$msgdat"
TZ="/usr/share/zoneinfo/${PT}" TZ="/usr/share/zoneinfo/${PT}"
done done
@ -31,6 +51,8 @@ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf echo "LANG=en_US.UTF-8" > /etc/locale.conf
clear clear
# Todo: List-select of locales somehow
prompt "Do you need more locales than just en_US? (y/N)" prompt "Do you need more locales than just en_US? (y/N)"
echo "MORE=$response" echo "MORE=$response"
MORE="$response" MORE="$response"
@ -60,19 +82,21 @@ if [[ -f /keymap ]]; then
fi fi
clear clear
prompt "System hostname" msgbox "Enter the system hostname"
HOSTNAME="$response" HOSTNAME="$msgdat"
echo ${HOSTNAME} > /etc/hostname echo ${HOSTNAME} > /etc/hostname
echo "127.0.0.1 localhost" > /etc/hosts echo "127.0.0.1 localhost" > /etc/hosts
prompt "Would you like IPV6? (y/N)"
IPS="$response" yesno "Would you like IPV6?"
if [[ "$IPS" == "y" || "$IPS" == "Y" ]]; then IPS="$yn"
if [[ "$IPS" == "0" ]]; then
echo "::1 localhost" >> /etc/hosts echo "::1 localhost" >> /etc/hosts
fi fi
echo "127.0.1.1 ${HOSTNAME}.localdomain ${HOSTNAME}" >> /etc/hosts echo "127.0.1.1 ${HOSTNAME}.localdomain ${HOSTNAME}" >> /etc/hosts
clear clear
inf "Password for root" inf "Set a password for root"
done="nope" done="nope"
while [[ "$done" == "nope" ]]; do while [[ "$done" == "nope" ]]; do
passwd passwd
@ -81,8 +105,8 @@ while [[ "$done" == "nope" ]]; do
fi fi
done done
prompt "Your username" msgbox "Your username"
UN="$response" UN="$msgdat"
useradd -m ${UN} useradd -m ${UN}
usermod -aG wheel ${UN} usermod -aG wheel ${UN}
inf "Set password for ${UN}" inf "Set password for ${UN}"
@ -121,34 +145,32 @@ pacman-key --populate crystal
clear clear
prompt "Would you like to install a DE/WM profile? (y/N)"
echo "DEP=$response" yesno "Would you like to install a DE/WM profile?"
DEP="$response" echo "DEP=$yn"
DEP="$yn"
if [[ "$DEP" == "y" || "$DEP" == "Y" ]]; then
inf "--- Desktop Environments ---" if [[ "$DEP" == "0" ]]; then
inf "- Budgie"
inf "- Cinnamon" dumptitle="Desktop/WM Choices"
inf "- Deepin"
inf "- Enlightenment (note: very DIY. Read Arch Wiki)" dump "\
inf "- GNOME" --- Desktop Environments ---
# Flashback seems to need some work - Budgie
#inf "- (GNOME) Flashback" - Cinnamon
inf "- KDE" - Deepin
inf "- LXDE" - GNOME
inf "- LXQt" - KDE
inf "- Mate" - LXDE
inf "- Cutefish" - LXQt
inf "- Xfce" - Mate
inf "- UKUI (note: very poorly documented. In english, anyway)" - Xfce"
inf "--- Window Managers ---"
inf "- i3" msgbox "DE Choice (please enter exactly)"
inf "(We'll add more as people ask)" echo "DE=$msgdat"
inf "Please enter exactly as shown." DE="$msgdat"
prompt ""
echo "DE=$response"
DE="$response"
DM="" DM=""
if [[ "$DE" == "Budgie" ]]; then if [[ "$DE" == "Budgie" ]]; then
pacman -Sy --quiet --noconfirm budgie-desktop gnome pacman -Sy --quiet --noconfirm budgie-desktop gnome
DM="gdm" DM="gdm"
@ -158,15 +180,9 @@ if [[ "$DEP" == "y" || "$DEP" == "Y" ]]; then
elif [[ "$DE" == "Deepin" ]]; then elif [[ "$DE" == "Deepin" ]]; then
pacman -Sy --quiet --noconfirm deepin deepin-extra pacman -Sy --quiet --noconfirm deepin deepin-extra
DM="lightdm" DM="lightdm"
elif [[ "$DE" == "Enlightenment" ]]; then
pacman -Sy --quiet --noconfirm enlightenment terminology
elif [[ "$DE" == "GNOME" ]]; then elif [[ "$DE" == "GNOME" ]]; then
pacman -Sy --quiet --noconfirm gnome gnome-extra chrome-gnome-shell pacman -Sy --quiet --noconfirm gnome gnome-extra chrome-gnome-shell
DM="gdm" DM="gdm"
elif [[ "$DE" == "Flashback" || "$DE" == "GNOME Flashback" || "$DE" == "(GNOME) Flashback" ]]; then
DE="Flashback"
pacman -Sy --quiet --noconfirm gnome-flashback gnome-backgrounds gnome-control-center network-manger-applet gnome-applets sensors-applet
DM="gdm"
elif [[ "$DE" == "KDE" ]]; then elif [[ "$DE" == "KDE" ]]; then
pacman -Sy --quiet --noconfirm plasma kde-applications sddm pacman -Sy --quiet --noconfirm plasma kde-applications sddm
DM="sddm" DM="sddm"
@ -179,47 +195,17 @@ if [[ "$DEP" == "y" || "$DEP" == "Y" ]]; then
elif [[ "$DE" == "Mate" ]]; then elif [[ "$DE" == "Mate" ]]; then
pacman -Sy --quiet --noconfirm mate mate-extra mate-applet-dock mate-applet-streamer pacman -Sy --quiet --noconfirm mate mate-extra mate-applet-dock mate-applet-streamer
DM="gdm" DM="gdm"
elif [[ "$DE" == "UKUI" ]]; then
pacman -Sy --quiet --noconfirm ukui
elif [[ "$DE" == "Xfce" ]]; then elif [[ "$DE" == "Xfce" ]]; then
pacman -Sy --quiet --noconfirm xfce4 xfce4-goodies pacman -Sy --quiet --noconfirm xfce4 xfce4-goodies
DM="sddm" DM="sddm"
elif [[ "$DE" == "Cutefish" || "$DE" == "cutefish" ]] ;then elif [[ "$DE" == "Cutefish" || "$DE" == "cutefish" ]] ;then
pacman -Sy --quiet --noconfirm cutefish pacman -Sy --quiet --noconfirm cutefish
DM="sddm" DM="sddm"
# Start WM's
elif [[ "$DE" == "i3" ]]; then
inf "Choose either i3 or i3-gaps in below prompt. Rest of group is your preference"
inf "Press enter"
prompt ""
pacman -Sy i3 xorg-xinit xorg-server
fi
if [[ "$DM" == "" ]]; then
inf "Your selected DE/WM doesn't have a standard display manager. Enter one of the below names, or leave blank for none"
inf "- gdm"
inf "- sddm"
inf "- lightdm (you'll need a greeter package. See Arch Wiki)"
inf "- (you can type another Arch package name if you have one in mind)"
inf "- [blank] for none"
prompt ""
ND="$response"
echo "ND=$ND"
if [[ "$ND" != "" ]]; then
inf "Ok, we'll install $ND"
DM="$ND"
pacman -Sy --quiet --noconfirm $DM
else
inf "Ok, not installing a display manager."
fi
else
pacman -Sy --quiet --noconfirm $DM
fi
if [[ "$DM" != "" ]]; then if [[ "$DM" != "" ]]; then
prompt "Would you like to enable ${DM} for ${DE}? (Y/n)" yesno "Would you like to enable ${DM} for ${DE}?"
useDM="$response" useDM="$yn"
if [[ "$useDM" != "n" ]]; then if [[ "$useDM" == "0" ]]; then
systemctl enable ${DM} systemctl enable ${DM}
if [[ "$DE" == "Deepin" ]]; then if [[ "$DE" == "Deepin" ]]; then
sed -i 's/lightdm-gtk-greeter/lightdm-deepin-greeter/g' /etc/lightdm/lightdm.conf sed -i 's/lightdm-gtk-greeter/lightdm-deepin-greeter/g' /etc/lightdm/lightdm.conf
@ -228,19 +214,19 @@ if [[ "$DEP" == "y" || "$DEP" == "Y" ]]; then
fi fi
fi fi
prompt "Would you like to add more packages? (Y/n)" yesno "Would you like to add more packages?"
MP="$response" MP="$yn"
if [[ "$MP" != "n" ]]; then if [[ "$MP" == "0" ]]; then
prompt "Would you like to use a URL to a package list? (Y/n)" yesno "Would you like to use a URL to a package list?"
OL="$response" OL="$yesno"
if [[ "$OL" == "n" ]]; then if [[ "$OL" != "0" ]]; then
prompt "Write package names" msgbox "Package names"
PKGNS="$response" PKGNS="$msgdat"
inf "Installing: $PKGNS" inf "Installing: $PKGNS"
ame -S ${PKGNS} ame -S ${PKGNS}
else else
prompt "URL to package list" msgbox "URL to package list"
SRC="$response" SRC="$msgdat"
PKGS="$(curl ${SRC})" PKGS="$(curl ${SRC})"
for PKG in PKGS; do for PKG in PKGS; do
ame -S ${PKG} ame -S ${PKG}
@ -248,4 +234,4 @@ if [[ "$MP" != "n" ]]; then
fi fi
fi fi
inf "Installation complete" #inf "Installation complete"

@ -0,0 +1,26 @@
#!/bin/bash
ins() {
pacman -Sy dialog --noconfirm --needed
chmod +x *.sh
cp *.sh /usr/bin
mv /usr/bin/citrine.sh /usr/bin/citrine
mv /usr/bin/citrine.internal.sh /usr/bin/citrine.internal
}
testc() {
citrine
}
if [[ "$1" == "" ]]; then
echo "./make.sh install - installs citrine"
echo "./make.sh test - (installs) then runs citrine"
exit 1
fi
if [[ "$1" == "install" ]]; then
ins
elif [[ "$1" == "test" ]]; then
ins
testc
fi

@ -0,0 +1 @@
"Crystal Linux" "rw root=/dev/sdc"
Loading…
Cancel
Save