Support for checking for updates
This commit is contained in:
parent
8a7b94ce15
commit
faaee67199
3 changed files with 23 additions and 2 deletions
12
script/check-up-to-date.sh
Executable file
12
script/check-up-to-date.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "Checking..."
|
||||
latest=`curl "https://api.github.com/repos/masonicboom/ipscrub/releases/latest" 2>/dev/null | grep --extended-regexp -o "\"tag_name\":\s+\".*\"" | cut -d '"' -f 4`
|
||||
current=`git tag | sort | tail -n 1`
|
||||
|
||||
if [ $current != $latest ]; then
|
||||
echo "Current version is $current; latest is $latest. Check https://github.com/masonicboom/ipscrub/releases to see if you should update."
|
||||
exit 1
|
||||
else
|
||||
echo "You are on the latest version of ipscrub ($current)."
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue