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 version
|
||||||
local cachedVersions
|
local cachedVersions
|
||||||
local arrCache
|
local arrCache
|
||||||
|
local owner="pi-hole"
|
||||||
cachedVersions="/etc/pihole/GitHubVersions"
|
cachedVersions="/etc/pihole/GitHubVersions"
|
||||||
|
|
||||||
#If the above file exists, then we can read from that. Prevents overuse of GitHub API
|
#If the above file exists, then we can read from that. Prevents overuse of GitHub API
|
||||||
|
@ -104,8 +105,12 @@ getRemoteVersion(){
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$daemon" == "AdminLTE" ]]; then
|
||||||
|
owner="arevindh"
|
||||||
|
fi
|
||||||
|
|
||||||
version=$(curl --silent --fail "https://api.github.com/repos/pi-hole/${daemon}/releases/latest" | \
|
version=$(curl --silent --fail "https://api.github.com/repos/${owner}/${daemon}/releases/latest" | \
|
||||||
awk -F: '$1 ~/tag_name/ { print $2 }' | \
|
awk -F: '$1 ~/tag_name/ { print $2 }' | \
|
||||||
tr -cd '[[:alnum:]]._-')
|
tr -cd '[[:alnum:]]._-')
|
||||||
if [[ "${version}" =~ ^v ]]; then
|
if [[ "${version}" =~ ^v ]]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue