if grep -q 'calibreweb_installed: True' /etc/iiab/iiab_state.yml; then
if [[ $1 == "-f" || $1 == "--fast" ]]; then
echo -e "\n\e[1mIf you want a COMPLETE reinstall of Calibre-Web, then also run:\n\n\e[0m\e[7mcd /opt/iiab/iiab ; ./runrole --reinstall calibre-web\e[0m\n"
fi
echo -e "\e[4mNow running: pipx uninstall xklb # THIS ALSO UNINSTALLS yt-dlp\e[0m\n"
pipx uninstall xklb
echo -e "\n\e[4mNow running: pipx install xklb # THIS ALSO INSTALLS yt-dlp\e[0m\n"
pipx install xklb
# IF YOU WANT THE "nightly" RELEASE OF yt-dlp, UNCOMMENT THE NEXT LINE:
if [[ $(git branch --show-current) != "master" || $(git status --porcelain --untracked-files=no) != "" ]]; then # Permit venv detritus, e.g. untracked files like these 5: bin/ include/ lib/ lib64 pyvenv.cfg
echo -e "\n\n\e[41;1mIn /usr/local/calibre-web-py3, (1) 'git branch' MUST show current branch 'master' and (2) 'git status' must show NO MODIFIED FILES.\e[0m\n\n"
# Skipping module not needed by Internet in a Box 12 en-PhET
# ...
# [ ~15 lines ]
# ...
# (Restarting CMDSRV
# ...
# [ VARIOUS ERRORS SOMETIMES HAPPEN HERE ]
if [ -d /opt/admin ]; then
if [[ $1 == "-f" || $1 == "--fast" ]]; then
echo -e "\n\e[33m'iiab-update -f' DOES NOT upgrade Admin Console.\e[0m"
else
cd /opt/iiab/iiab-admin-console
if [[ $(git branch --show-current) != "master" || $(git status --porcelain) != "" ]]; then
echo -e "\n\n\e[41;1mIn /opt/iiab/iiab-admin-console, (1) 'git branch' MUST show current branch 'master' and (2) 'git status' must show NO MODIFIED FILES.\e[0m\n\n"