Better indent in source code

This commit is contained in:
q3aql 2021-03-28 03:34:04 +02:00
parent 3f07f73dbb
commit e7b4bb9e48

View File

@ -11,21 +11,21 @@ URL_SPOTIFY="http://repository.spotify.com/pool/non-free/s/spotify-client"
#Check if user is root. #Check if user is root.
user=$(whoami) user=$(whoami)
if [ "$user" == "root" ] ; then if [ "$user" == "root" ] ; then
echo "OK" > /dev/null echo "OK" > /dev/null
else else
echo "You must be root!" echo "You must be root!"
exit 0 exit 0
fi fi
#Check name of kernel. #Check name of kernel.
KERNEL=$(uname -s) KERNEL=$(uname -s)
if [ $KERNEL == "Linux" ]; then if [ $KERNEL == "Linux" ]; then
KERNEL=linux KERNEL=linux
else else
echo "OS not supported ($KERNEL)" echo "OS not supported ($KERNEL)"
exit 0 exit 0
fi fi
#Check if your system is Debian or Ubuntu. #Check if your system is Debian or Ubuntu.
CHECK_SYSTEM=`uname -a` CHECK_SYSTEM=`uname -a`
@ -52,77 +52,77 @@ else
fi fi
#Check 'curl' in your system. #Check 'curl' in your system.
curl --help > /dev/null curl --help > /dev/null
if [ "$?" -eq 0 ] ; then if [ "$?" -eq 0 ] ; then
clear clear
else else
apt-get update apt-get update
apt-get install curl -y apt-get install curl -y
fi fi
#Check 'wget' in your system. #Check 'wget' in your system.
wget --help > /dev/null wget --help > /dev/null
if [ "$?" -eq 0 ] ; then if [ "$?" -eq 0 ] ; then
APP_DOWNLOAD='wget -c' APP_DOWNLOAD='wget -c'
NAME_APP_DOWNLOAD="wget" NAME_APP_DOWNLOAD="wget"
clear clear
else else
apt-get update apt-get update
apt-get install wget -y apt-get install wget -y
fi fi
#Check 'gdebi' in your system. #Check 'gdebi' in your system.
gdebi --help > /dev/null gdebi --help > /dev/null
if [ "$?" -eq 0 ] ; then if [ "$?" -eq 0 ] ; then
clear clear
else else
apt-get update apt-get update
apt-get install gdebi -y apt-get install gdebi -y
fi fi
#Check other downloaders. #Check other downloaders.
axel --help > /dev/null axel --help > /dev/null
if [ "$?" -eq 0 ] ; then if [ "$?" -eq 0 ] ; then
APP_DOWNLOAD='axel' APP_DOWNLOAD='axel'
NAME_APP_DOWNLOAD="axel" NAME_APP_DOWNLOAD="axel"
fi fi
aria2c --help > /dev/null aria2c --help > /dev/null
if [ "$?" -eq 0 ] ; then if [ "$?" -eq 0 ] ; then
APP_DOWNLOAD='aria2c --check-certificate=false' APP_DOWNLOAD='aria2c --check-certificate=false'
NAME_APP_DOWNLOAD="aria2c" NAME_APP_DOWNLOAD="aria2c"
fi fi
#Get the current versions of Spotify. #Get the current versions of Spotify.
SPOTIFY_32=`curl $URL_SPOTIFY/ | cut -d ">" -f 2 | cut -d "<" -f 1 | grep i386 | tail -n 1` SPOTIFY_32=`curl $URL_SPOTIFY/ | cut -d ">" -f 2 | cut -d "<" -f 1 | grep i386 | tail -n 1`
SPOTIFY_64=`curl $URL_SPOTIFY/ | cut -d ">" -f 2 | cut -d "<" -f 1 | grep amd64 | tail -n 1` SPOTIFY_64=`curl $URL_SPOTIFY/ | cut -d ">" -f 2 | cut -d "<" -f 1 | grep amd64 | tail -n 1`
MESSAGE_32=`clear && echo "Downloading $SPOTIFY_32 ($NAME_APP_DOWNLOAD)"` MESSAGE_32=`clear && echo "Downloading $SPOTIFY_32 ($NAME_APP_DOWNLOAD)"`
MESSAGE_64=`clear && echo "Downloading $SPOTIFY_64 ($NAME_APP_DOWNLOAD)"` MESSAGE_64=`clear && echo "Downloading $SPOTIFY_64 ($NAME_APP_DOWNLOAD)"`
if [ $? -eq 0 ] ; then if [ $? -eq 0 ] ; then
echo "Connection OK" > /dev/null echo "Connection OK" > /dev/null
else else
clear clear
echo "" echo ""
echo "Error: Failed to obtain the required information from the server!" echo "Error: Failed to obtain the required information from the server!"
echo "Connection Fail!" echo "Connection Fail!"
echo "" echo ""
exit exit
fi fi
#Menu #Menu
MENU_VARIABLE=1 MENU_VARIABLE=1
while [ $MENU_VARIABLE -le 2 ] ; do while [ $MENU_VARIABLE -le 2 ] ; do
clear clear
echo "" echo ""
echo "Spotify installer ($VERSION)" echo "Spotify installer ($VERSION)"
echo "" echo ""
echo "Installed: $SPOTIFY_VERSION" echo "Installed: $SPOTIFY_VERSION"
echo "" echo ""
echo "Available packages:" echo "Available packages:"
echo "" echo ""
echo "(1) $SPOTIFY_32 (32-bits)" echo "(1) $SPOTIFY_32 (32-bits)"
echo "(2) $SPOTIFY_64 (64-bits)" echo "(2) $SPOTIFY_64 (64-bits)"
echo "" echo ""
echo "(q) - quit" echo "(q) - quit"
echo "" echo ""
echo -n "(Default: autodetect) Choose an option; " ; read PACKAGE echo -n "(Default: autodetect) Choose an option; " ; read PACKAGE
if [ "${PACKAGE:-NO_VALUE}" == "NO_VALUE" ] ; then if [ "${PACKAGE:-NO_VALUE}" == "NO_VALUE" ] ; then
# Detect the arch of the system if variable # Detect the arch of the system if variable