mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-25 16:50:14 +00:00
Update version.sh
This commit is contained in:
parent
1d2135a602
commit
6958884e9e
1 changed files with 6 additions and 1 deletions
|
@ -90,6 +90,7 @@ getRemoteVersion(){
|
|||
local version
|
||||
local cachedVersions
|
||||
local arrCache
|
||||
local owner="pi-hole"
|
||||
cachedVersions="/etc/pihole/GitHubVersions"
|
||||
|
||||
#If the above file exists, then we can read from that. Prevents overuse of GitHub API
|
||||
|
@ -105,7 +106,11 @@ getRemoteVersion(){
|
|||
return 0
|
||||
fi
|
||||
|
||||
version=$(curl --silent --fail "https://api.github.com/repos/pi-hole/${daemon}/releases/latest" | \
|
||||
if [[ "$daemon" == "AdminLTE" ]]; then
|
||||
owner="arevindh"
|
||||
fi
|
||||
|
||||
version=$(curl --silent --fail "https://api.github.com/repos/${owner}/${daemon}/releases/latest" | \
|
||||
awk -F: '$1 ~/tag_name/ { print $2 }' | \
|
||||
tr -cd '[[:alnum:]]._-')
|
||||
if [[ "${version}" =~ ^v ]]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue