Bump up version number to 0.2

This commit is contained in:
clamsawd 2016-01-08 21:44:09 +01:00
parent 2f114f6ab2
commit 30bef8a9ce

View File

@ -3,13 +3,13 @@
# Script to install Spotify on Debian/Ubuntu # Script to install Spotify on Debian/Ubuntu
# Created by clamsawd (clamsawd@openmailbox.org) # Created by clamsawd (clamsawd@openmailbox.org)
# Licensed by GPL v.2 # Licensed by GPL v.2
# Last update: 19-09-2015 # Last update: 08-01-2015
# -------------------------------------- # --------------------------------------
VERSION=0.1 VERSION=0.2
SPOTIFY_VERSION=`spotify --version | cut -d "," -f 1` SPOTIFY_VERSION=`spotify --version | cut -d "," -f 1`
URL_SPOTIFY="http://repository.spotify.com/pool/non-free/s/spotify-client" 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
@ -18,7 +18,7 @@ user=$(whoami)
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
@ -27,7 +27,7 @@ KERNEL=$(uname -s)
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`
CHECK_DEBIAN=`uname -a | grep "Debian"` CHECK_DEBIAN=`uname -a | grep "Debian"`
CHECK_UBUNTU=`uname -a | grep "Ubuntu"` CHECK_UBUNTU=`uname -a | grep "Ubuntu"`
@ -38,9 +38,9 @@ echo "Spotify installer ($VERSION)"
echo "" echo ""
if [ "$CHECK_SYSTEM" == "$CHECK_DEBIAN" ]; then if [ "$CHECK_SYSTEM" == "$CHECK_DEBIAN" ]; then
echo "$CHECK_DEBIAN" echo "System detected: $CHECK_DEBIAN"
elif [ "$CHECK_SYSTEM" == "$CHECK_UBUNTU" ]; then elif [ "$CHECK_SYSTEM" == "$CHECK_UBUNTU" ]; then
echo "$CHECK_UBUNTU" echo "System detected: $CHECK_UBUNTU"
else else
echo "Your system is not Debian or Ubuntu!" echo "Your system is not Debian or Ubuntu!"
echo -n "(Default: n) Continue anyway? (y/n): " ; read CONTINUE echo -n "(Default: n) Continue anyway? (y/n): " ; read CONTINUE
@ -54,34 +54,47 @@ 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
echo "curl OK"
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
echo "wget OK" APP_DOWNLOAD='wget -c'
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
echo "gdebi OK"
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.
axel --help > /dev/null
if [ "$?" -eq 0 ] ; then
APP_DOWNLOAD='axel'
NAME_APP_DOWNLOAD="axel"
fi
aria2c --help > /dev/null
if [ "$?" -eq 0 ] ; then
APP_DOWNLOAD='aria2c --check-certificate=false'
NAME_APP_DOWNLOAD="aria2c"
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` SPOTIFY_32=`curl $URL_SPOTIFY/ | cut -d ">" -f 2 | cut -d "<" -f 1 | grep i386`
SPOTIFY_64=`curl $URL_SPOTIFY/ | cut -d ">" -f 2 | cut -d "<" -f 1 | grep amd64` SPOTIFY_64=`curl $URL_SPOTIFY/ | cut -d ">" -f 2 | cut -d "<" -f 1 | grep amd64`
MESSAGE_32=`clear && echo "Downloading $SPOTIFY_32 ($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
@ -118,7 +131,8 @@ echo -n "(Default: autodetect) Choose an option; " ; read PACKAGE
case "$archs" in case "$archs" in
i?86) i?86)
cd /tmp/ cd /tmp/
wget -c $URL_SPOTIFY/$SPOTIFY_32 echo $MESSAGE_32
$APP_DOWNLOAD $URL_SPOTIFY/$SPOTIFY_32
gdebi $SPOTIFY_32 gdebi $SPOTIFY_32
rm -rf $SPOTIFY_32 rm -rf $SPOTIFY_32
echo "Exiting..." echo "Exiting..."
@ -126,7 +140,8 @@ echo -n "(Default: autodetect) Choose an option; " ; read PACKAGE
;; ;;
x86_64) x86_64)
cd /tmp/ cd /tmp/
wget -c $URL_SPOTIFY/$SPOTIFY_64 echo $MESSAGE_64
$APP_DOWNLOAD $URL_SPOTIFY/$SPOTIFY_64
gdebi $SPOTIFY_64 gdebi $SPOTIFY_64
rm -rf $SPOTIFY_64 rm -rf $SPOTIFY_64
echo "Exiting..." echo "Exiting..."
@ -139,7 +154,8 @@ echo -n "(Default: autodetect) Choose an option; " ; read PACKAGE
elif [ "$PACKAGE" == "1" -o "$PACKAGE" == "32" ] ; then elif [ "$PACKAGE" == "1" -o "$PACKAGE" == "32" ] ; then
cd /tmp/ cd /tmp/
wget -c $URL_SPOTIFY/$SPOTIFY_32 echo $MESSAGE_32
$APP_DOWNLOAD $URL_SPOTIFY/$SPOTIFY_32
gdebi $SPOTIFY_32 gdebi $SPOTIFY_32
rm -rf $SPOTIFY_32 rm -rf $SPOTIFY_32
echo "Exiting..." echo "Exiting..."
@ -147,7 +163,8 @@ echo -n "(Default: autodetect) Choose an option; " ; read PACKAGE
elif [ "$PACKAGE" == "2" -o "$PACKAGE" == "64" ] ; then elif [ "$PACKAGE" == "2" -o "$PACKAGE" == "64" ] ; then
cd /tmp/ cd /tmp/
wget -c $URL_SPOTIFY/$SPOTIFY_64 echo $MESSAGE_64
$APP_DOWNLOAD $URL_SPOTIFY/$SPOTIFY_64
gdebi $SPOTIFY_64 gdebi $SPOTIFY_64
rm -rf $SPOTIFY_64 rm -rf $SPOTIFY_64
echo "Exiting..." echo "Exiting..."
@ -166,5 +183,3 @@ echo -n "(Default: autodetect) Choose an option; " ; read PACKAGE
read NOOPTION read NOOPTION
fi fi
done done