58 lines
1.1 KiB
Bash
Executable File
58 lines
1.1 KiB
Bash
Executable File
#!/bin/zsh
|
|
#
|
|
|
|
# asdf, direnv, python & lastversion
|
|
#
|
|
# - https://github.com/dvershinin/lastversion
|
|
#
|
|
cd $(dirname $0)
|
|
eval $(asdf exec direnv export zsh)
|
|
|
|
# zsh colors
|
|
#
|
|
autoload colors && colors
|
|
|
|
|
|
machine=amd64
|
|
|
|
function debian
|
|
{
|
|
program=$1
|
|
repository=$2
|
|
|
|
echo -n "${bg[green]}${fg[black]}\n>>>> ${program}${reset_color}\n\n"
|
|
|
|
# TODO debian package
|
|
|
|
if (( ${+commands[$program]} )); then
|
|
|
|
${program} --version
|
|
\ls -lh =${program}
|
|
|
|
current_version=$(lastversion format "$(${program} --version)")
|
|
last_version=$(lastversion ${repository} --newer-than ${current_version})
|
|
|
|
if [[ $? -eq 0 ]]; then
|
|
echo "${fg[cyan]}"
|
|
lastversion ${repository} --filter="${machine}\.deb" --assets
|
|
|
|
else
|
|
echo "\n${fg[green]}up to date."
|
|
fi
|
|
|
|
else
|
|
echo "${fg[yellow]}...not found.\n"
|
|
|
|
echo -n "${fg[cyan]}"
|
|
lastversion ${repository} --filter="${machine}\.deb" --assets
|
|
fi
|
|
|
|
echo -n ${reset_color}
|
|
}
|
|
|
|
###
|
|
|
|
debian bat "https://github.com/sharkdp/bat"
|
|
debian git-delta "https://github.com/dandavison/delta"
|
|
debian lsd "https://github.com/lsd-rs/lsd"
|