xiringuito/scripts/client-check-if-outdated.sh
2017-04-23 19:38:20 +02:00

15 lines
369 B
Bash
Executable File

#!/usr/bin/env bash
#
# Check, if we are behind the latest master (and warn if we are)
#
set -e
git remote update >/dev/null
REMOTE_TS=$(git show --pretty="format:%ct" origin master)
LOCAL_TS=$(git show --pretty="format:%ct")
if [[ ${LOCAL_TS} -lt ${REMOTE_TS} ]]; then
echo "*** WARNING: You are running outdated Xiringuito version. Remember: 'git pull' FTW!"
fi