Update all dotfiles

This commit is contained in:
2025-05-22 17:56:05 -05:00
parent 0280a88a7b
commit 4bb042584b
1651 changed files with 60533 additions and 2672 deletions

View File

@ -0,0 +1,14 @@
#!/bin/bash
# ------------------------------------------------------
# Compare installed version with used version
# ------------------------------------------------------
source ~/.config/ml4w/version/library.sh
if [ -f /usr/share/ml4w-hyprland/dotfiles/.config/ml4w/version/name ] ;then
installed_version=$(cat /usr/share/ml4w-hyprland/dotfiles/.config/ml4w/version/name)
used_version=$(cat ~/.config/ml4w/version/name)
if [[ $(testvercomp $used_version $installed_version "<") == "0" ]] ;then
notify-send "Please run ml4w-hyprland-setup" "Installed version is newer then the version you're currently using."
fi
fi

View File

@ -0,0 +1,42 @@
vercomp () {
if [[ $1 == $2 ]]
then
return 0
fi
local IFS=.
local i ver1=($1) ver2=($2)
# fill empty fields in ver1 with zeros
for ((i=${#ver1[@]}; i<${#ver2[@]}; i++))
do
ver1[i]=0
done
for ((i=0; i<${#ver1[@]}; i++))
do
if ((10#${ver1[i]:=0} > 10#${ver2[i]:=0}))
then
return 1
fi
if ((10#${ver1[i]} < 10#${ver2[i]}))
then
return 2
fi
done
return 0
}
testvercomp () {
vercomp $1 $2
case $? in
0) op='=';;
1) op='>';;
2) op='<';;
esac
if [[ $op != $3 ]]
then
# No update available
echo "1"
else
# Update available
echo "0"
fi
}

View File

@ -0,0 +1 @@
2.9.7.4

View File

@ -0,0 +1,25 @@
#!/bin/bash
# ------------------------------------------------------
# Check for updates
# ------------------------------------------------------
source ~/.config/ml4w/version/library.sh
# Get latest tag from GitHub
get_latest_release() {
v_online=$(curl --silent "https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=ml4w-hyprland")
v_full_online=$(grep -m 1 'pkgver' <<< $v_online | sed 's/^$/pkgver/')
echo ${v_full_online/pkgver=/}
}
# Check for internet connection
if ping -q -c 1 -W 1 google.com >/dev/null; then
version=$(cat ~/.config/ml4w/version/name)
online=$(get_latest_release "mylinuxforwork/hyprland-dotfiles")
echo $version "<" $online
testvercomp $version $online "<"
else
# Network is down
echo "1"
fi