Merge install scripts into one

This commit is contained in:
GermanBread 2021-01-05 17:40:21 +00:00
parent 58f0390112
commit 33361757d0
3 changed files with 269 additions and 303 deletions

269
LULI.sh Normal file
View File

@ -0,0 +1,269 @@
#!/bin/bash
# Original script by https://github.com/GermanBread
# Lightcord unified Linux installer by Germanbread
# Some helper funtions
function Info {
tput setaf 8
tput bold
printf "==> "
tput setaf 15
printf "$1\n"
tput sgr0
}
function SubInfo {
tput setaf 8
printf "> "
printf "$1\n"
tput sgr0
}
function Warning {
tput setaf 3
tput bold
printf "==> "
tput setaf 11
printf "$1\n"
tput sgr0
}
function Error {
tput setaf 1
tput bold
printf "==> "
tput setaf 9
printf "$1\n"
tput sgr0
}
if [[ $TERM == dumb ]]; then
exit
fi
if [[ "$(whoami)" == "root" ]]; then
Error "Don't run this script as root"
exit
fi
cat << "logo_end"
_ _ _ _ _
| | (_)__ _| |_| |_ __ ___ _ _ __| |
| |__| / _` | ' \ _/ _/ _ \ '_/ _` |
|____|_\__, |_||_\__\__\___/_| \__,_|
|___/
Unified Linux Installer and Updater
logo_end
# First, we need to figure out what kind of install the user wants (AppImage or System-wide?)
printf "Please select\n"
printf "1: Install Lightcord for all users\n"
printf "2: Install Lightcord only for you (Appimage install)\n"
printf "\n"
#Repeat only if the user hasn't entered an integer...
while ! [[ $method =~ ^[0-9]+$ ]];
do
read method;
# If the entered value was not an integer, prompt the user again
if ! [[ $method =~ ^[0-9]+$ ]]; then
sleep 1
printf "$(tput setaf 9)Please try again$(tput sgr0)\n"
printf "1: Install Lightcord for all users\n"
printf "2: Install Lightcord only for you (Appimage install)\n"
printf "\n"
fi
done
if [[ $method == 1 ]]; then
Warning "Warning:\n\tBlindly running software as root is a massive security issue.\n\tIf you don't fully trust the software you're running DON'T RUN IT AS ROOT.\n\tIf you know exactly what you are doing, continue.\n\tOtherwise restart this script and choose the second option.\n"
Info "Please enter your password"
if [[ "$(sudo -k whoami)" != "root" ]]; then
Error "Authentication failed"
exit
fi
Info "Authentication complete"
fi
case $method in
1)
#Standard installer
tput setaf 208
tput sgr0
printf "Please select\n"
printf "1: Install Lightcord\n"
printf "2: Uninstall Lightcord\n"
printf "3: Update Lightcord\n"
printf "\n"
#Repeat only if the user hasn't entered an integer...
while ! [[ $selection =~ ^[0-9]+$ ]];
do
read selection;
# If the entered value was not an integer, prompt the user again
if ! [[ $selection =~ ^[0-9]+$ ]]; then
sleep 1;
printf "$(tput setaf 9)Please try again$(tput sgr0)\n";
printf "1: Install Lightcord\n";
printf "2: Uninstall Lightcord\n";
printf "3: Update Lightcord\n"
printf "\n";
fi
done
case $selection in
1) # Install LC
Info "Installing Lightcord"
SubInfo "Preparing"
rm -rf Lightcord.*;
rm -rf Lightcord;
rm -rf lightcord-linux-x64.*;
SubInfo "Downloading Lightcord"
wget https://lightcord.org/api/v1/gh/releases/Lightcord/Lightcord/dev/lightcord-linux-x64.zip;
unzip lightcord-linux-x64.zip -d Lightcord;
rm lightcord-linux-x64.zip;
prev_pwd = pwd;
cd Lightcord;
chmod +x ./lightcord;
cd ..;
sudo mv Lightcord/ /opt/;
rm Lightcord/;
SubInfo "Downloading Lightcord icon"
wget https://raw.githubusercontent.com/Lightcord/LightcordLogos/master/lightcord/lightcord.svg;
sudo mv lightcord.svg /usr/share/pixmaps;
sudo rm -rf /usr/share/applications/Lightcord.desktop
SubInfo "Creating Desktop entry"
echo -e "[Desktop Entry]\nName=Lightcord\nComment[fr_FR]=Un client Discord simple et personalisable\nComment=A simple - customizable - Discord Client\nExec=/opt/Lightcord/lightcord\nIcon=lightcord\nTerminal=false\nType=Application\nCategories=Network;InstantMessaging;P2P;" >> /usr/share/applications/Lightcord.desktop
sudo chmod +x /usr/share/applications/Lightcord.desktop;
SubInfo "Cleaning up"
rm -rf Lightcord.*;
rm -rf Lightcord;
rm -rf lightcord-linux-x64.*;
;;
2) # Uninstall LC
Info "Uninstalling Lightcord"
SubInfo "Deleting Lightcord folder"
sudo rm -r /opt/Lightcord;
SubInfo "Deleting Lightcord Icon"
sudo rm /usr/share/pixmaps/lightcord.svg;
SubInfo "Deleting Desktop entry"
sudo rm /usr/share/applications/Lightcord.desktop;
sudo rm -f /home/*/.local/share/applications/Lightcord.desktop;
;;
3) # Update LC
Info 'Updating Lightcord'
SubInfo "Preparing"
rm -r /opt/Lightcord;
rm -rf Lightcord.*;
rm -rf Lightcord;
rm -rf lightcord-linux-x64.*;
SubInfo "Downloading Lightcord"
wget https://lightcord.org/api/v1/gh/releases/Lightcord/Lightcord/dev/lightcord-linux-x64.zip;
unzip lightcord-linux-x64.zip -d Lightcord;
rm lightcord-linux-x64.zip;
prev_pwd = pwd;
cd Lightcord;
chmod +x ./lightcord;
cd ..;
mv Lightcord/ /opt/;
SubInfo "Cleaning up"
rm Lightcord/;
rm -rf Lightcord.*;
rm -rf Lightcord;
rm -rf lightcord-linux-x64.*;
;;
*) # Do nothing
Error 'Aborting install'
;;
esac
;;
2)
# Appimage installer
appimage='https://lightcord.org/api/gh/releases/Lightcord/Lightcord/dev/lightcord-linux-x86_64.AppImage'
icon='https://raw.githubusercontent.com/Lightcord/Lightcord/master/discord.png'
if [[ $TERM == dumb ]]; then
exit;
fi
tput setaf 208
tput sgr0
printf "Please select\n";
printf "1: Install Lightcord\n";
printf "2: Uninstall Lightcord\n";
printf "3: Update Lightcord\n"
printf "\n";
while ! [[ $selection =~ ^[0-9]+$ ]];
do
read selection;
# If the entered value was not an integer, prompt the user again
if ! [[ $selection =~ ^[0-9]+$ ]]; then
sleep 1;
printf "$(tput setaf 9)Please try again$(tput sgr0)\n";
printf "1: Install Lightcord\n";
printf "2: Uninstall Lightcord\n";
printf "3: Update Lightcord\n"
printf "\n";
fi
done
case $selection in
1) # Install LC
Info 'Installing Lightcord'
wget -O lightcord.AppImage $appimage;
wget -O lightcord.png $icon;
mkdir -p ~/.lightcord;
mv lightcord.AppImage ~/.lightcord;
chmod +x ~/.lightcord/lightcord.AppImage ;
mkdir -p ~/.local/share/icons/hicolor/512x512/apps
mv lightcord.png ~/.local/share/icons/hicolor/512x512/apps;
echo -e "[Desktop Entry]\nName=Lightcord\nComment[fr_FR]=Un client Discord simple et personalisable\nComment=A simple - customizable - Discord Client\nExec=${HOME}/.lightcord/lightcord.AppImage\nIcon=lightcord\nTerminal=false\nType=Application\nCategories=Network;InstantMessaging;P2P;" >> ~/.local/share/applications/lightcord.desktop;
;;
2) # Uninstall LC
Info 'Uninstalling Lightcord'
rm -rf ~/.lightcord;
rm ~/.local/share/icons/hicolor/512x512/apps/lightcord.png;
rm ~/.local/share/applications/lightcord.desktop;
;;
3) # Update LC
Info 'Updating Lightcord'
rm -f ~/.lightcord/lightcord.AppImage;
wget -O lightcord.AppImage $appimage;
mkdir -p ~/.lightcord;
mv lightcord.AppImage ~/.lightcord;
chmod +x ~/.lightcord/lightcord.AppImage ;
;;
*)
Error 'Aborting install'
;;
esac
;;
*)
Error 'Aborting install'
;;
esac
printf "Do you want to keep the install script? [y/N] "; # Ask if the script should delete itself
read a;
case $a in
y)
exit;
;;
Y)
exit;
;;
esac
# Remove the script
rm -f LULI.sh;

View File

@ -1,192 +0,0 @@
#!/bin/bash
# Original script by https://github.com/GermanBread
if [[ $TERM == dumb ]]; then
exit;
fi
if [[ $(whoami) != "root" ]] ; then
printf "[$(tput setaf 9 && tput blink)PANIC$(tput sgr0)] $(tput setaf 9)This script needs to run as root$(tput sgr0)\n";
exit;
fi
tput setaf 208
cat << "EOF"
_ _ _ _ _
| | (_)__ _| |_| |_ __ ___ _ _ __| |
| |__| / _` | ' \ _/ _/ _ \ '_/ _` |
|____|_\__, |_||_\__\__\___/_| \__,_|
|___/
Linux Installer and Updater
EOF
tput sgr0
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 12)This script depends on unzip! Install that package first!$(tput sgr0)\n";
printf "Please select\n";
printf "1: Install Lightcord\n";
printf "2: Uninstall Lightcord\n";
printf "3: Update Lightcord\n"
printf "\n";
#Repeat only if the user hasn't entered an integer...
while ! [[ $selection =~ ^[0-9]+$ ]];
do
read selection;
#if the entered value was not an integer, show this
if ! [[ $selection =~ ^[0-9]+$ ]]; then
sleep 1;
printf "$(tput setaf 9)Please try again$(tput sgr0)\n";
printf "1: Install Lightcord\n";
printf "2: Uninstall Lightcord\n";
printf "3: Update Lightcord\n"
printf "\n";
fi
done
case $selection in
1)
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 12)Installing Lightcord$(tput sgr0)\n";
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Downloading Lightcord zip to $(pwd && tput sgr0)\n";
rm -rf Lightcord.*;
rm -rf Lightcord;
rm -rf lightcord-linux-x64.*;
wget https://lightcord.org/api/v1/gh/releases/Lightcord/Lightcord/dev/lightcord-linux-x64.zip;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Unzipping$(tput sgr0)\n";
unzip lightcord-linux-x64.zip -d Lightcord;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Deleting zip$(tput sgr0)\n";
rm lightcord-linux-x64.zip;
prev_pwd = pwd;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Changing directory into $(pwd)/Lightcord$(tput sgr0)\n";
cd Lightcord;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Giving $(pwd)/lightcord executable execute permissions$(tput sgr0)\n";
chmod +x ./lightcord;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Changing directory into ${prev_pwd}$(tput sgr0)\n";
cd ..;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Moving $(pwd)/Lightcord folder to /opt$(tput sgr0)\n";
mv Lightcord/ /opt/;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Deleting $(pwd)/Lightcord folder$(tput sgr0)\n";
rm Lightcord/;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Downloading lightcord.svg icon to $(pwd && tput sgr0)\n";
wget https://raw.githubusercontent.com/Lightcord/LightcordLogos/master/lightcord/lightcord.svg;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Moving $(pwd)/lightcord.svg file to /usr/share/pixmaps$(tput sgr0)\n";
mv lightcord.svg /usr/share/pixmaps;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Generating and moving Lightcord.desktop file to /usr/share/Lightcord.desktop$(tput sgr0)\n";
rm -rf /usr/share/applications/Lightcord.desktop
echo -e "[Desktop Entry]\nName=Lightcord\nComment[fr_FR]=Un client Discord simple et personalisable\nComment=A simple - customizable - Discord Client\nExec=/opt/Lightcord/lightcord\nIcon=lightcord\nTerminal=false\nType=Application\nCategories=Network;InstantMessaging;P2P;" >> /usr/share/applications/Lightcord.desktop
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Giving /usr/share/Lightcord.desktop execute permissions$(tput sgr0)\n";
chmod +x /usr/share/applications/Lightcord.desktop;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Cleaning up$(tput sgr0)\n";
rm -rf Lightcord.*;
rm -rf Lightcord;
rm -rf lightcord-linux-x64.*;
printf "[$(tput setaf 10 && tput blink)FINISH$(tput sgr0)] Installation complete\n";
;;
2)
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 12)Uninstalling Lightcord$(tput sgr0)\n";
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 12)Deleting /opt/Lightcord$(tput sgr0)\n";
rm -r /opt/Lightcord;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 12)Deleting /usr/share/pixmaps/lightcord.svg$(tput sgr0)\n";
rm /usr/share/pixmaps/lightcord.svg;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 12)Deleting /usr/share/Lightcord.desktop$(tput sgr0)\n";
rm /usr/share/applications/Lightcord.desktop;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 12)Deleting /home/*/.local/share/applications/Lightcord.desktop$(tput sgr0)\n";
rm -f /home/*/.local/share/applications/Lightcord.desktop;
printf "[$(tput setaf 10 && tput blink)FINISH$(tput sgr0)] Uninstall complete\n";
;;
3)
#Uninstall
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 12)Updating Lightcord$(tput sgr0)\n";
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 12)Deleting /opt/Lightcord$(tput sgr0)\n";
rm -r /opt/Lightcord;
#Install
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Downloading Lightcord zip to $(pwd && tput sgr0)\n";
rm -rf Lightcord.*;
rm -rf Lightcord;
rm -rf lightcord-linux-x64.*;
wget https://lightcord.org/api/v1/gh/releases/Lightcord/Lightcord/dev/lightcord-linux-x64.zip;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Unzipping$(tput sgr0)\n";
unzip lightcord-linux-x64.zip -d Lightcord;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Deleting zip$(tput sgr0)\n";
rm lightcord-linux-x64.zip;
prev_pwd = pwd;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Changing directory into $(pwd)/Lightcord$(tput sgr0)\n";
cd Lightcord;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Giving $(pwd)/lightcord executable execute permissions$(tput sgr0)\n";
chmod +x ./lightcord;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Changing directory into ${prev_pwd}$(tput sgr0)\n";
cd ..;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Moving $(pwd)/Lightcord folder to /opt$(tput sgr0)\n";
mv Lightcord/ /opt/;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Deleting $(pwd)/Lightcord folder$(tput sgr0)\n";
rm Lightcord/;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Cleaning up$(tput sgr0)\n";
rm -rf Lightcord.*;
rm -rf Lightcord;
rm -rf lightcord-linux-x64.*;
printf "[$(tput setaf 10 && tput blink)FINISH$(tput sgr0)] Update complete\n";
;;
# 4)
# printf "Please select\n";
# printf "1: \"/opt/Lightcord/Lightcord not found\"\n";
# printf "2: None of the above\n"
# printf "\n";
#
# #Repeat only if the user hasn't entered an integer...
# while ! [[ $troubleshooting_selection =~ ^[0-9]+$ ]];
# do
# read troubleshooting_selection;
# #if the entered value was not an integer, show this
# if ! [[ $troubleshooting_selection =~ ^[0-9]+$ ]]; then
# sleep 1;
# printf "$(tput setaf 9)Please try again$(tput sgr0)\n";
# printf "1: \"/opt/Lightcord/Lightcord not found\"\n";
# printf "2: None of the above\n"
# printf "\n";
# fi
# done
#
# case $troubleshooting_selection in
# 1)
# printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Modifying /usr/share/applications/Lightcord.desktop$(tput sgr0)\n";
# sed -i 's/Lightcord\/Lightcord/Lightcord\/lightcord/' /usr/share/applications/Lightcord.desktop > /dev/null 2>&1;
# sed -i 's/Lightcord\/Lightcord/Lightcord\/lightcord/' /home/*/.local/share/applications/Lightcord.desktop > /dev/null 2>&1;
# printf "[$(tput setaf 10 && tput blink)FINISH$(tput sgr0)] Done\n";
# ;;
#
# 2)
# printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 15)Visit the official server for support: https://discord.gg/7eFff2A$(tput sgr0)\n";
# ;;
#
# *)
# printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 12)Exiting troubleshooting$(tput sgr0)\n";
# ;;
# esac
# ;;
#
*)
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 12)Exiting script$(tput sgr0)\n";
;;
esac
#ask the user if the script should not delete itself
printf "Do you want to keep the install script? [y/N] ";
read a;
case $a in
y)
exit;
;;
Y)
exit;
;;
esac
#if the user didn't say yes
rm -f Lightcord_installer.sh;

View File

@ -1,111 +0,0 @@
#!/bin/bash
# Original script by https://github.com/GermanBread
appimage='https://lightcord.org/api/gh/releases/Lightcord/Lightcord/dev/lightcord-linux-x86_64.AppImage'
icon='https://raw.githubusercontent.com/Lightcord/Lightcord/master/discord.png'
if [[ $TERM == dumb ]]; then
exit;
fi
if [[ $(whoami) = "root" ]] ; then
printf "[$(tput setaf 9 && tput blink)PANIC$(tput sgr0)] $(tput setaf 9)Do not run this script as root!$(tput sgr0)\n";
exit;
fi
tput setaf 208
cat << "EOF"
_ _ _ _ _
| | (_)__ _| |_| |_ __ ___ _ _ __| |
| |__| / _` | ' \ _/ _/ _ \ '_/ _` |
|____|_\__, |_||_\__\__\___/_| \__,_|
|___/
AppImage Installer and Updater
EOF
tput sgr0
printf "Please select\n";
printf "1: Install Lightcord\n";
printf "2: Uninstall Lightcord\n";
printf "3: Update Lightcord\n"
printf "\n";
while ! [[ $selection =~ ^[0-9]+$ ]];
do
read selection;
#if the entered value was not an integer, show this
if ! [[ $selection =~ ^[0-9]+$ ]]; then
sleep 1;
printf "$(tput setaf 9)Please try again$(tput sgr0)\n";
printf "1: Install Lightcord\n";
printf "2: Uninstall Lightcord\n";
printf "3: Update Lightcord\n"
printf "\n";
fi
done
case $selection in
1)
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 12)Installing Lightcord$(tput sgr0)\n";
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Downloading Lightcord$(tput sgr0)\n";
wget -O lightcord.AppImage $appimage;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Downloading Icon$(tput sgr0)\n";
wget -O lightcord.png $icon;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Moving Lightcord AppImage to ~/.lightcord$(tput sgr0)\n";
mkdir -p ~/.lightcord;
mv lightcord.AppImage ~/.lightcord;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Setting Executable Permissions$(tput sgr0)\n";
chmod +x ~/.lightcord/lightcord.AppImage ;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Installing Icon$(tput sgr0)\n";
mkdir -p ~/.local/share/icons/hicolor/512x512/apps
mv lightcord.png ~/.local/share/icons/hicolor/512x512/apps;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Installing Desktop File$(tput sgr0)\n";
echo -e "[Desktop Entry]\nName=Lightcord\nComment[fr_FR]=Un client Discord simple et personalisable\nComment=A simple - customizable - Discord Client\nExec=${HOME}/.lightcord/lightcord.AppImage\nIcon=lightcord\nTerminal=false\nType=Application\nCategories=Network;InstantMessaging;P2P;" >> ~/.local/share/applications/lightcord.desktop;
;;
2)
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 12)Deleting Lightcord AppImage$(tput sgr0)\n";
rm -rf ~/.lightcord;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 12)Deleting Icon$(tput sgr0)\n";
rm ~/.local/share/icons/hicolor/512x512/apps/lightcord.png;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 12)Deleting Desktop File$(tput sgr0)\n";
rm ~/.local/share/applications/lightcord.desktop;
printf "[$(tput setaf 10 && tput blink)FINISH$(tput sgr0)] Uninstall complete\n";
;;
3)
#Uninstall
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 12)Updating Lightcord$(tput sgr0)\n";
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 12)Deleting Lightcord AppImage$(tput sgr0)\n";
rm -f ~/.lightcord/lightcord.AppImage;
#Install
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Downloading Lightcord$(tput sgr0)\n";
wget -O lightcord.AppImage $appimage;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Moving Lightcord AppImage to ~/.lightcord$(tput sgr0)\n";
mkdir -p ~/.lightcord;
mv lightcord.AppImage ~/.lightcord;
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 7)Setting Executable Permissions$(tput sgr0)\n";
chmod +x ~/.lightcord/lightcord.AppImage ;
printf "[$(tput setaf 10 && tput blink)FINISH$(tput sgr0)] Update complete\n";
;;
*)
printf "[$(tput setaf 12 && tput blink)INFO$(tput sgr0)] $(tput setaf 12)Exiting script$(tput sgr0)\n";
;;
esac
printf "Do you want to keep the install script? [y/N] ";
read a;
case $a in
y)
exit;
;;
Y)
exit;
;;
esac
#if the user didn't say yes
rm -f appimage_installer.sh;