mirror of
https://github.com/aclist/dztui.git
synced 2026-11-02 16:12:11 +01:00
Abstract news url
This commit is contained in:
1 parent
c6962ebc37
commit
5217531974
1 file changed
+4
-3
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
version=2.8.0-rc.3
|
version=2.8.0-rc.4
|
||||||
|
|
||||||
aid=221100
|
aid=221100
|
||||||
game="dayz"
|
game="dayz"
|
||||||
@@ -20,7 +20,6 @@ stable_url="$url_prefix/dzgui"
|
|||||||
testing_url="$url_prefix/testing"
|
testing_url="$url_prefix/testing"
|
||||||
releases_url="https://github.com/aclist/dztui/releases/download/browser"
|
releases_url="https://github.com/aclist/dztui/releases/download/browser"
|
||||||
help_url="https://aclist.github.io/dzgui/dzgui"
|
help_url="https://aclist.github.io/dzgui/dzgui"
|
||||||
news_url="$testing_url/news"
|
|
||||||
freedesktop_path="$HOME/.local/share/applications"
|
freedesktop_path="$HOME/.local/share/applications"
|
||||||
sd_install_path="$HOME/.local/share/dzgui"
|
sd_install_path="$HOME/.local/share/dzgui"
|
||||||
helpers_path="$sd_install_path/helpers"
|
helpers_path="$sd_install_path/helpers"
|
||||||
@@ -45,6 +44,8 @@ update_last_seen(){
|
|||||||
source $config_file
|
source $config_file
|
||||||
}
|
}
|
||||||
check_news(){
|
check_news(){
|
||||||
|
[[ $branch == "stable" ]] && news_url="$stable_url/news"
|
||||||
|
[[ $branch == "testing" ]] && news_url="$testing_url/news"
|
||||||
result=$(curl -Ls "$news_url")
|
result=$(curl -Ls "$news_url")
|
||||||
sum=$(echo -n "$result" | md5sum | awk '{print $1}')
|
sum=$(echo -n "$result" | md5sum | awk '{print $1}')
|
||||||
}
|
}
|
||||||
@@ -84,7 +85,7 @@ depcheck(){
|
|||||||
watcher_deps(){
|
watcher_deps(){
|
||||||
if [[ ! $(command -v wmctrl) ]] && [[ ! $(command -v xdotool) ]]; then
|
if [[ ! $(command -v wmctrl) ]] && [[ ! $(command -v xdotool) ]]; then
|
||||||
echo "100"
|
echo "100"
|
||||||
warn "Requires wmctrl or xdotool"
|
warn "Missing dependency: requires 'wmctrl' or 'xdotool'.\nInstall from your system's package manager."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user