dotfiles/.local/share/github-versions/tlapm

25 lines
692 B
Bash
Executable file

#! /usr/bin/bash
set -euo pipefail
IFS=$'\n\t'
package=tlapm
repo=tlaplus/tlapm
tlapm_resource() {
echo "tlapm-$1-x86_64-linux-gnu.tar.gz"
}
INSTALL_DIR="$(systemd-path user-state-private)"/tlapm
install_tlapm() {
tempdir="$(mktemp --directory)" && \
tar xz --directory="${tempdir}" && \
chmod --recursive o-rwx "${tempdir}" && \
rm --force --recursive "${INSTALL_DIR}" && \
mv "${tempdir}"/tlapm "$(dirname "${INSTALL_DIR}")" && \
rm --force --recursive "${tempdir}" && \
ln --symbolic "${INSTALL_DIR}"/bin/tlapm "$(systemd-path user-binaries)"/tlapm
}
github_update "${package}" "${repo}" tlapm_resource install_tlapm 1.6.0-pre