jitty-scripts/vscode-suse-repo.sh

38 lines
813 B
Bash
Raw Permalink Normal View History

2017-03-15 00:17:13 -07:00
#!/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
printf "${LGREEN}Adding Microsoft asc key file...${NC}\n"
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
printf "${LGREEN}Adding VSCODE OpenSuse Repository...${NC}\n"
printf "${LBLUE}Syncing repositories...(with sudo)${NC}\n"
sudo zypper refresh
printf "${YELLOW} Do you want to install Visual Studio Code now?[y/n]: ${NC}"
read choice
if [ "${choice}" = "n" ];then
exit 0;
elif [ "${choice}" = "y" ];then
sudo zypper install code
else
printf "${LRED}Please enter lowercase y or n${NC}\n"
exit 0;
fi