diff --git a/vscode-suse-repo.sh b/vscode-suse-repo.sh new file mode 100755 index 0000000..3346dc2 --- /dev/null +++ b/vscode-suse-repo.sh @@ -0,0 +1,38 @@ +#!/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 \ No newline at end of file