From 4a86ea8f4d9b080040709026ebb8bba350b3b456 Mon Sep 17 00:00:00 2001 From: wilfison Date: Wed, 10 Aug 2022 16:34:20 -0300 Subject: [PATCH] add discord install --- AppInstall.sh | 15 ++++++++------- src/discord.sh | 12 ++++++++++++ 2 files changed, 20 insertions(+), 7 deletions(-) create mode 100755 src/discord.sh diff --git a/AppInstall.sh b/AppInstall.sh index af2bd0a..ffa0ffc 100755 --- a/AppInstall.sh +++ b/AppInstall.sh @@ -16,6 +16,7 @@ clear APPINST_APPS_LIST=( 'Chrome ; chrome' + 'Discord ; discord' 'Docker ; docker' 'Extras (codecs, decompressors, etc) ; extras' 'FFMPEG (Latest) ; ffmpeg' @@ -33,14 +34,14 @@ multiselect APPINST_APPS_SELECTED APPINST_APPS_LIST # check if an option has been entered if [ ${#APPINST_APPS_SELECTED[@]} -eq 0 ]; then - show_warning_log "Error! Select at least one option" && - exit 1 + show_warning_log "Error! Select at least one option" && + exit 1 fi for APPINST_APP in "${APPINST_APPS_SELECTED[@]}"; do - if [ -f "$BASEDIR/$APPINST_APP.sh" ]; then - bash $BASEDIR/$APPINST_APP.sh - else - show_error_log "'$APPINST_APP' is not a valid option!" - fi + if [ -f "$BASEDIR/$APPINST_APP.sh" ]; then + bash $BASEDIR/$APPINST_APP.sh + else + show_error_log "'$APPINST_APP' is not a valid option!" + fi done diff --git a/src/discord.sh b/src/discord.sh new file mode 100755 index 0000000..487c6e5 --- /dev/null +++ b/src/discord.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +source $APPINST_BASEDIR/src/helpers/colors.sh + +appinst_file="$APPINST_APPS_PATH/discord.deb" + +show_info_log "Downloading installer..." && + wget "https://discord.com/api/download/stable?platform=linux&format=deb" -O $appinst_file && + show_info_log "Installing..." && + sudo dpkg -i $appinst_file && + rm $appinst_file && + show_success_log "Discord successfully installed"