Update install.sh

This commit is contained in:
poka 2022-05-07 22:14:13 +00:00
parent 7b41e738aa
commit 43a84512e4
3 changed files with 12 additions and 5 deletions

2
.gitignore vendored
View File

@ -1,3 +1,3 @@
lib/spotify_ripper lib/spotify-ripper
.env .env
.token_cache .token_cache

View File

@ -8,20 +8,27 @@ if [[ ! $(which python) ]]; then
if [[ ! $(which pyenv) ]]; then if [[ ! $(which pyenv) ]]; then
echo "pyenv installation..." echo "pyenv installation..."
curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
echo "export PYENV_ROOT=\"$HOME/.pyenv\"" >> $HOME/.bashrc
echo "command -v pyenv >/dev/null || export PATH=\"$PYENV_ROOT/bin:$PATH\"" >> $HOME/.bashrc
echo "eval \"$(pyenv init -)\"" >> $HOME/.bashrc
echo "Restat terminal and relaunch this install script" echo "Restat terminal and relaunch this install script"
exit 0 exit 0
fi fi
pyenv install 3.9.6 pyenv install 3.9.6
pyenv global 3.9.6 pyenv global 3.9.6
echo "Restat terminal and relaunch this install script again"
exit 0
fi fi
sudo apt install lame build-essential libffi-dev jq curl sudo apt install -y lame build-essential libffi-dev jq curl
wget -q -O - https://apt.mopidy.com/mopidy.gpg | sudo apt-key add - #add mopidy's libspotify repository wget -q -O - https://apt.mopidy.com/mopidy.gpg | sudo apt-key add - #add mopidy's libspotify repository
sudo wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/stretch.list #valid for Debian Stretch. sudo wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/stretch.list #valid for Debian Stretch.
sudo apt update && sudo apt install libspotify12 libspotify-dev python-spotify #install libspotify from mopidy's repository sudo apt update && sudo apt install libspotify12 libspotify-dev #install libspotify from mopidy's repository
mkdir -p lib mkdir -p lib
[[ ! -f .env ]] && cp .env.template .env && chmod 600 .env [[ ! -f .env ]] && cp .env.template .env && chmod 600 .env
git clone https://github.com/lavolp3/spotify-ripper.git lib/spotify-ripper && cd lib/spotify-ripper && python setup.py install git clone https://github.com/migo1271/spotify-ripper.git lib/spotify-ripper && cd lib/spotify-ripper && sudo python setup.py install
pyenv rehash pyenv rehash
## Source: https://github.com/migo1271/spotify-ripper

View File

@ -32,5 +32,5 @@ else
fi fi
## Start download ## Start download
SPOTIPY_CLIENT_ID="" SPOTIPY_CLIENT_SECRET="" SPOTIPY_REDIRECT_URI="" python lib/spotify_ripper/spotify_ripper/main.py -k .spotify_appkey.key -u "$sp_id" -p "$sp_password" $link -f "$output/$format" SPOTIPY_CLIENT_ID="" SPOTIPY_CLIENT_SECRET="" SPOTIPY_REDIRECT_URI="" python lib/spotify-ripper/spotify_ripper/main.py -k .spotify_appkey.key -u "$sp_id" -p "$sp_password" $link -f "$output/$format"
rm -f /tmp/list_links.txt rm -f /tmp/list_links.txt