2022-02-03

This commit is contained in:
Louis Seubert 2022-02-03 19:33:04 +01:00
parent f86b8496ec
commit db393215ce
Signed by: louis9902
GPG key ID: 4B9DB28F826553BD
55 changed files with 1907 additions and 0 deletions

26
home/dot-local/bin/update-code Executable file
View file

@ -0,0 +1,26 @@
#!/usr/bin/env bash
: "${LIB_SHELL_PATH:="${XDG_LIB_HOME:-"${HOME}/.local/lib"}/bash"}"
LIB_SHELL_PATH="/home/louis/Documents/dotfiles/home/dot-local/lib/bash"
# shellcheck disable=SC2015
[[ -e "${LIB_SHELL_PATH}/common.sh" ]] && {
export IMPORTPATH="${PWD}:${LIB_SHELL_PATH}"
# shellcheck source=home/dot-local/lib/bash/common.sh
source "${LIB_SHELL_PATH}/common.sh" >/dev/null 2>&1
} || { echo "error: cannot load common shell lib" >&2; exit 1; }
import "github-api.sh"
function @report() {
printf "➜ %s of vscodium is avaiable\n" "${@}"
}
while read -r version link; do
if ! rpm -qa | grep "codium-${version}" >/dev/null; then
@report "version ${version}"
sudo dnf install -y "${link}"
else
@report "no new version"
fi
done < <(SUFFIX="$(uname -i).rpm" github_latest_release_assets 'vscodium')