jitty-scripts/update-chrome.sh

65 lines
1.1 KiB
Bash
Raw Normal View History

#!/bin/bash
# Colors
RED='\033[0;31m'
LRED="\033[1;31m"
BLUE="\033[0;34m"
LBLUE="\033[1;34m"
GREEN="\033[0;32m"
LGREEN="\033[1;32m"
YELLOW="\033[1;33m"
CYAN="\033[0;36m"
LCYAN="\033[1;36m"
PURPLE="\033[0;35m"
LPURPLE="\033[1;35m"
BWHITE="\e[1m"
NC='\033[0m' # No Color
INSTALLDIR="/home/${USER}/.voidlinux"
if [ ! -f /usr/bin/git ];then
printf "${LCYAN}Installing git...${NC}\n"
sudo xbps-install -S git
fi
if [ ! -d ${INSTALLDIR} ];then
printf "${LCYAN}Creating install folder...${NC}\n"
mkdir -p ${INSTALLDIR}
fi
cd ${INSTALLDIR}
if [ ! -d void-packages ];then
printf "${LCYAN}Cloning Void Packages...${NC}\n"
git clone https://github.com/voidlinux/void-packages.git
fi
cd void-packages
git pull origin master
printf "${YELLOW}Bootsrapping chrooted system...${NC}\n"
./xbps-src binary-bootstrap
printf "${LCYAN}Checking for boostrap package updates${NC}\n"
./xbps-src bootstrap-update
echo XBPS_ALLOW_RESTRICTED=yes >> etc/conf
printf "${LGREEN}Building Google Chrome...${NC}\n"
./xbps-src pkg google-chrome
sudo xbps-install -y -R hostdir/binpkgs/nonfree google-chrome
printf "${LGREEN}There you go Leslie!${NC}\n"