Some error handling
This commit is contained in:
parent
4af80ffe85
commit
25595543bc
2 changed files with 10 additions and 17 deletions
4
root.sh
4
root.sh
|
@ -37,7 +37,7 @@ options=(1 "LaTeX packages" off
|
||||||
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
|
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
|
||||||
clear
|
clear
|
||||||
printf "\n${BLUE}Now installing main programs.\n${NC}"
|
printf "\n${BLUE}Now installing main programs.\n${NC}"
|
||||||
pacman --noconfirm --needed -S base-devel xorg-xinit xorg-server rxvt-unicode feh ffmpeg pulseaudio pulseaudio-alsa arandr pavucontrol pamixer mpv wget rofi vim w3m ranger mediainfo poppler highlight tmux calcurse htop newsbeuter mpd mpc ncmpcpp network-manager-applet networkmanager imagemagick transmission-cli atool libcaca compton transset-df markdown mupdf evince rsync git youtube-dl youtube-viewer cups screenfetch scrot unzip unrar ntfs-3g offlineimap msmtp notmuch notmuch-mutt dosfstools fzf r pandoc
|
pacman --noconfirm --needed -S base-devel xorg-xinit xorg-server rxvt-unicode feh ffmpeg pulseaudio pulseaudio-alsa arandr pavucontrol pamixer mpv wget rofi vim w3m ranger mediainfo poppler highlight tmux calcurse htop newsbeuter mpd mpc ncmpcpp network-manager-applet networkmanager imagemagick transmission-cli atool libcaca compton transset-df markdown mupdf evince rsync git youtube-dl youtube-viewer cups screenfetch scrot unzip unrar ntfs-3g offlineimap msmtp notmuch notmuch-mutt dosfstools fzf r pandoc || echo "Error installing basic packages. Check your internet connection and pacman keyring." && exit
|
||||||
for choice in $choices
|
for choice in $choices
|
||||||
do
|
do
|
||||||
case $choice in
|
case $choice in
|
||||||
|
@ -113,7 +113,7 @@ echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||||
|
|
||||||
sudo -u $USER bash /home/$USER/user.sh
|
sudo -u $USER bash /home/$USER/user.sh
|
||||||
|
|
||||||
curl https://raw.githubusercontent.com/LukeSmithxyz/LARBS/master/sudoers > /etc/sudoers
|
curl https://raw.githubusercontent.com/LukeSmithxyz/larbs/master/sudoers > /etc/sudoers
|
||||||
|
|
||||||
dialog --title "All done!" --msgbox "Congrats! Provided there were no hidden errors, the script completed successfully and all the programs and configuration files should be in place.\n\nTo run the new graphical environment, log out and log back in as your new user, then run the command \"startx\" to start the graphical environment.\n\n-Luke" 12 80
|
dialog --title "All done!" --msgbox "Congrats! Provided there were no hidden errors, the script completed successfully and all the programs and configuration files should be in place.\n\nTo run the new graphical environment, log out and log back in as your new user, then run the command \"startx\" to start the graphical environment.\n\n-Luke" 12 80
|
||||||
clear
|
clear
|
||||||
|
|
23
user.sh
23
user.sh
|
@ -10,26 +10,19 @@ pulseaudio --start
|
||||||
|
|
||||||
|
|
||||||
printf "${BLUE}Installing packer as an AUR manager...\n${NC}"
|
printf "${BLUE}Installing packer as an AUR manager...\n${NC}"
|
||||||
wget https://aur.archlinux.org/cgit/aur.git/snapshot/packer.tar.gz
|
|
||||||
tar -xvzf packer.tar.gz
|
aurinstall() { curl -O https://aur.archlinux.org/cgit/aur.git/snapshot/$1.tar.gz && tar -xvf $1.tar.gz && cd $1 && makepkg --noconfirm -si && cd .. && rm -rf $1 $1.tar.gz ;}
|
||||||
cd packer
|
|
||||||
makepkg --noconfirm -si
|
aurinstall packer || echo "Error installing packer." && exit
|
||||||
cd ..
|
|
||||||
rm -rf packer/
|
|
||||||
rm packer.tar.gz
|
|
||||||
|
|
||||||
printf "${BLUE}Installing AUR programs...\n${NC}"
|
printf "${BLUE}Installing AUR programs...\n${NC}"
|
||||||
printf "${BLUE}(May take some time.)\n${NC}"
|
printf "${BLUE}(May take some time.)\n${NC}"
|
||||||
packer --noconfirm -S i3-gaps vim-pathogen vim-live-latex-preview neofetch i3lock tamzen-font-git neomutt transmission-remote-cli-git unclutter-xfixes-git urxvt-resize-font-git ttf-ancient-fonts polybar-git python-pywal xfce-theme-blackbird
|
packer --noconfirm -S i3-gaps vim-pathogen vim-live-latex-preview neofetch i3lock tamzen-font-git neomutt transmission-remote-cli-git unclutter-xfixes-git urxvt-resize-font-git ttf-ancient-fonts polybar-git python-pywal xfce-theme-blackbird || echo "Error installing AUR packages. Check your internet connections and pacman keys." && exit
|
||||||
#packer --noconfirm -S ncpamixer-git speedometer cli-visualizer
|
#packer --noconfirm -S ncpamixer-git speedometer cli-visualizer
|
||||||
|
|
||||||
printf "${BLUE}Downloading config files...\n${NC}"
|
printf "${BLUE}Downloading config files...\n${NC}"
|
||||||
git clone https://github.com/lukesmithxyz/voidrice.git
|
git clone https://github.com/lukesmithxyz/voidrice.git && rsync -va voidrice/ /home/$USER && rm -rf voidrice
|
||||||
rsync -va voidrice/ /home/$USER
|
git clone https://github.com/lukesmithxyz/latex-templates.git && mkdir -p /home/$USER/Documents/LaTeX && rsync -va latex-templates /home/$USER/Documents/LaTeX && rm -rf latex-templates
|
||||||
git clone https://github.com/lukesmithxyz/latex-templates.git
|
|
||||||
mkdir -p /home/$USER/Documents/LaTeX
|
|
||||||
rsync -va latex-templates /home/$USER/Documents/LaTeX
|
|
||||||
sudo rm -rf voidrice
|
|
||||||
sudo rm -rf latex-templates
|
|
||||||
printf "${BLUE}Generating bash/ranger/qutebrowser shortcuts...\n${NC}"
|
printf "${BLUE}Generating bash/ranger/qutebrowser shortcuts...\n${NC}"
|
||||||
python ~/.config/Scripts/shortcuts.py
|
python ~/.config/Scripts/shortcuts.py
|
||||||
|
|
Loading…
Reference in a new issue