#!/bin/sh APP=conty-lite REPO="Kron4ek/Conty" version=$(curl -Ls https://api.github.com/repos/$REPO/releases | jq '.' | grep -w -v zsync | grep browser_download_url | grep -i "conty_lite.sh" | cut -d '"' -f 4 | head -1) # CREATE THE FOLDER mkdir /opt/$APP cd /opt/$APP # ADD THE REMOVER echo '#!/bin/sh' >> /opt/$APP/remove echo "rm -R -f /usr/share/applications/AM-$APP.desktop /opt/$APP /usr/local/bin/$APP" >> /opt/$APP/remove chmod a+x /opt/$APP/remove # DOWNLOAD THE APPIMAGE mkdir tmp wget $version -O $APP cd tmp wget $version.zsync 2> /dev/null cd .. chmod a+x /opt/$APP/$APP mv ./tmp/*.zsync ./$APP.zsync 2> /dev/null rmdir ./tmp echo $version >> ./version # LINK ln -s /opt/$APP/$APP /usr/local/bin/$APP # SCRIPT TO UPDATE THE PROGRAM cat >> /opt/$APP/AM-updater << 'EOF' #!/bin/sh APP=conty-lite REPO="Kron4ek/Conty" version=$(curl -Ls https://api.github.com/repos/$REPO/releases | jq '.' | grep -w -v zsync | grep browser_download_url | grep -i "conty_lite.sh" | cut -d '"' -f 4 | head -1) cd /opt/$APP mkdir tmp cd ./tmp wget $version.zsync 2> /dev/null cd .. mv ./tmp/*.zsync ./$APP.zsync rmdir ./tmp zsync /opt/$APP/$APP.zsync rm -R -f /opt/$APP/*zs-old /opt/$APP/*.part chmod a+x /opt/$APP/$APP EOF chmod a+x /opt/$APP/AM-updater