#!/bin/ash ##Script for updating OfflineIMAP3 NewOfflineIMAPVer=$(curl -s https://api.github.com/repos/OfflineIMAP/offlineimap3/tags | grep 'name.*' |head -n 1 | cut -d : -f 2,3 | tr -d \" |tr -d , |tr -d " ") printf "OfflineIMAP: checking for upgrades... " if [ "$NewOfflineIMAPVer" != "$(cat /opt/OfflineIMAP3-installed)" ]; then echo "update found" curl https://github.com/OfflineIMAP/offlineimap3/archive/refs/tags/$OfflineIMAPVer.tar.gz -o /tmp/olim3.zip unzip -q /tmp/olim3.zip -d /opt/OfflineIMAP3 sed -i -e '/kerberos/c\' -e '/cygwin/c\' /opt/OfflineIMAP3/requirements.txt pip3 install -r /opt/OfflineIMAP3/requirements.txt echo $NewOfflineIMAPVer > /opt/OfflineIMAP3-installed echo " upgrade complete" else echo "update not found" fi