#!/bin/sh newest_version="$(curl https://git.sr.ht/~nytpu/comitium/info/refs | grep -Eo refs/tags/v[0-9.]\+$ | tail -n 1 | cut -c11-)" current_version="$(comitium version | grep -Eo comitium\ v[0-9.]\+ | cut -c10-)" if [ -z "$current_version" ] || [ "$current_version" != "$newest_version" ] then cd {{ src_dir }}/comitium git fetch git switch --detach ${newest_version} make make install fi