Hyprland-dotfiles/.version/update.sh

17 lines
439 B
Bash
Raw Normal View History

2024-01-18 08:59:44 -05:00
#!/bin/bash
# Check for internet connection
if ping -q -c 1 -W 1 google.com >/dev/null; then
version=$(cat ~/dotfiles/.version/version)
online=$(curl -s https://gitlab.com/stephan-raabe/dotfiles/-/raw/main/.version/version?ref_type=heads)
if [ "$version" -lt "$online" ]; then
# Update available
echo "0"
else
# No update available
echo "1"
fi
else
# Network is down
echo "1"
fi