uppy.sh: don't remember

Former-commit-id: 7e4e52b5be58c9ccd246f85909a59a95a5d56cc7
This commit is contained in:
mollusk 2018-10-29 23:18:36 -07:00
parent 4dba502f2d
commit 70f8d8f438

60
uppy.sh Normal file
View File

@ -0,0 +1,60 @@
#!/bin/bash
CONFIG="~/config/.uppy.conf"
# 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
if [ ! -f /usr/bin/apt ];then
echo -e "${LRED}Apt is missing!..exiting!${NC}\n"
exit 1
fi
if [ ! -f ${CONFIG} ];then
echo -e "${LBLUE}Creating config in ${CONFIG}${NC}\n"
touch ${CONFIG}
fi
if grep -Fxq "AUTOCONFIRM='true'" ${CONFIG};then
AUTO="yes"
else
echo -n "Do you want to skip confirmations?[n/Y]"
read confirm
if [ "${confirm}" = "y" ];then
echo "AUTOCONFIRM='true'" > ${CONFIG}
fi
fi
echo -e "${LBLUE}Checking Sources...${NC}\n"
sudo apt update
echo -e "${LBLUE}Starting Upgrade...${NC}\n"
if [ "${AUTO}" = "yes" ];then
sudo apt -y upgrade
else
sudo apt upgrade
fi