This repository has been archived on 2022-03-25. You can view files and clone it, but cannot push or open issues or pull requests.
manjaroConfiguration/installSpotify.sh

24 lines
1.2 KiB
Bash
Raw Normal View History

2021-11-14 00:44:24 +01:00
# We make sure that Snap and flatpak versions are uninstalled
sudo snap remove spotify 2> /dev/null
sudo flatpak uninstall com.spotify.Client 2> /dev/null
2021-11-14 00:44:24 +01:00
# We install the version from the official website
2021-11-14 20:16:25 +01:00
which curl &> /dev/null || sudo apt update && sudo apt install curl -y # Install curl if not already installed
curl -sS https://download.spotify.com/debian/pubkey_0D811D58.gpg | sudo apt-key add -
echo "deb http://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list
sudo apt update
sudo apt install spotify-client -y
2021-11-14 00:44:24 +01:00
# We install the prerequisites to build and install the patch (Git and Rust will be installed and not removed)
sudo apt install git make build-essential -y
2021-11-14 22:07:27 +01:00
which rustc &> /dev/null || curl https://sh.rustup.rs -sSf | { sh -s -- -y; source $HOME/.cargo/env } # Install rust if not already installed
2021-11-14 00:44:24 +01:00
# Download and build the patch
git clone https://github.com/abba23/spotify-adblock.git
cd spotify-adblock
make
2021-11-14 00:44:24 +01:00
# Install the patch
sudo make install
2021-11-14 00:44:24 +01:00
# Removing sourcecode folder
cd ..
rm -rf spotify-adblock
2021-11-14 00:44:24 +01:00
# We replace the Ubuntu desktop shortcut
2021-11-08 18:45:21 +01:00
sudo sed -i "7s#.*#Exec=env LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify %U#" /usr/share/applications/spotify.desktop