Update 'anime_scripts/jellyfin-namer-new.sh'

This commit is contained in:
tzatzikiweeb 2020-05-05 13:39:35 +03:00
parent 91a0f23e32
commit 032d2997d5

View File

@ -1,12 +1,21 @@
#!/bin/bash
#Check if requests is installed, and if not install it
python -c "import requests"
if [[ "$?" == "1" ]]; then
apt update
apt install python-requests
if [[ -f /tmp/request_install_lock ]]; then
while [[ -f /tmp/requests_install_lock ]]; do
sleep 1
done
else
python -c "import requests"
if [[ "$?" == "1" ]]; then
echo '' > /tmp/requests_install_lock
apt update
apt install python-requests
rm /tmp/requests_install_lock
fi
fi
#Gets the last part of the current directory
function get_bottom_dir() {
IFS='/';