Hyprland-dotfiles/.version/update.sh
Stephan Raabe 696bd36be8 Updates
2024-01-18 14:59:44 +01:00

17 lines
439 B
Bash
Executable File

#!/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