Error handling improvements
This commit is contained in:
6
user.sh
6
user.sh
@@ -5,6 +5,8 @@ NC='\033[0m'
|
||||
printf "${BLUE}Changing directory to /home/$USER...\n${NC}"
|
||||
cd /home/$USER
|
||||
|
||||
error() { dialog --title "Error!" --msgbox "We've run into a fatal-ish error. Check the LARBS.log file for more information" 10 60 && clear && exit ;}
|
||||
|
||||
printf "${BLUE}Activating Pulseaudio if not already active...\n${NC}"
|
||||
pulseaudio --start
|
||||
|
||||
@@ -13,11 +15,11 @@ printf "${BLUE}Installing packer as an AUR manager...\n${NC}"
|
||||
|
||||
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 ;}
|
||||
|
||||
aurinstall packer || (echo "Error installing packer." && exit)
|
||||
aurinstall packer || (echo "Error installing packer." >> LARBS.log && error)
|
||||
|
||||
printf "${BLUE}Installing AUR programs...\n${NC}"
|
||||
printf "${BLUE}(May take some time.)\n${NC}"
|
||||
packer --noconfirm -S i3-gaps vim-pathogen neofetch i3lock tamzen-font-git neomutt unclutter-xfixes-git urxvt-resize-font-git polybar-git python-pywal xfce-theme-blackbird || (echo "Error installing AUR packages. Check your internet connections and pacman keys." && exit)
|
||||
packer --noconfirm -S i3-gaps vim-pathogen neofetch i3lock tamzen-font-git neomutt unclutter-xfixes-git urxvt-resize-font-git polybar-git python-pywal xfce-theme-blackbird || (echo "Error installing AUR packages. Check your internet connections and pacman keys." >> LARBS.log && error)
|
||||
#packer --noconfirm -S ncpamixer-git speedometer cli-visualizer
|
||||
choices=$(cat choices)
|
||||
for choice in $choices
|
||||
|
||||
Reference in New Issue
Block a user