directory fixes

This commit is contained in:
Luke 2017-10-08 17:13:16 -07:00
parent 2b3d7f4781
commit 40588366b7
2 changed files with 11 additions and 5 deletions

View file

@ -1,8 +1,9 @@
#!/bin/bash #!/bin/bash
cd /
pacman -S --noconfirm --needed dialog || (echo "Error at script start: Are you sure you're running this as the root user? Are you sure you have an internet connection?" && exit) pacman -S --noconfirm --needed dialog || (echo "Error at script start: Are you sure you're running this as the root user? Are you sure you have an internet connection?" && exit)
blue() { printf "\033[0;34m $* \033[0m\n" && (chmod 777 LARBS.log && echo $* >> LARBS.log) ;} blue() { printf "\033[0;34m $* \033[0m\n" && (echo $* >> LARBS.log) ;}
red() { printf "\033[0;31m $* \033[0m\n" && (chmod 777 LARBS.log && echo ERROR: $* >> LARBS.log) ;} red() { printf "\033[0;31m $* \033[0m\n" && (echo ERROR: $* >> LARBS.log) ;}
dialog --title "Welcome!" --msgbox "Welcome to Luke's Auto-Rice Bootstrapping Script!\n\nThis script will automatically install a fully-featured i3wm Arch Linux desktop, which I use as my main machine.\n\n-Luke" 10 60 dialog --title "Welcome!" --msgbox "Welcome to Luke's Auto-Rice Bootstrapping Script!\n\nThis script will automatically install a fully-featured i3wm Arch Linux desktop, which I use as my main machine.\n\n-Luke" 10 60
@ -114,7 +115,11 @@ curl https://raw.githubusercontent.com/LukeSmithxyz/larbs/master/larbs_user.sh >
sudo -u $NAME bash /tmp/larbs_user.sh || red Error when running larbs_user.sh... sudo -u $NAME bash /tmp/larbs_user.sh || red Error when running larbs_user.sh...
rm -f /tmp/larbs_user.sh rm -f /tmp/larbs_user.sh
printf "${BLUE}Enabling Network Manager...\n${NC}" cat /tmp/LARBS.log >> /LARBS.log
cp /LARBS.log LARBS.log && chmod 777 LARBS.log
blue Enabling Network Manager...
systemctl enable NetworkManager systemctl enable NetworkManager
systemctl start NetworkManager systemctl start NetworkManager

View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
blue() { printf "\033[0;34m $* \033[0m\n" ;} blue() { printf "\033[0;34m $* \033[0m\n" && (echo $* >> LARBS.log) ;}
red() { printf "\033[0;31m $* \033[0m\n" ;} red() { printf "\033[0;31m $* \033[0m\n" && (echo ERROR: $* >> LARBS.log) ;}
NAME=$(whoami) NAME=$(whoami)
@ -81,4 +81,5 @@ blue Downloading config files...
git clone https://github.com/lukesmithxyz/voidrice.git && rsync -va voidrice/ /home/$NAME && rm -rf voidrice git clone https://github.com/lukesmithxyz/voidrice.git && rsync -va voidrice/ /home/$NAME && rm -rf voidrice
blue Generating bash/ranger/qutebrowser shortcuts... blue Generating bash/ranger/qutebrowser shortcuts...
cd /home/$NAME/
python /home/$NAME/.config/Scripts/shortcuts.py python /home/$NAME/.config/Scripts/shortcuts.py