-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2effca3
commit df6b4a9
Showing
2 changed files
with
5 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,6 @@ | ||
#!/bin/bash | ||
|
||
webVer=$(wget -qO- https://raw.githubusercontent.com/flathub/com.boxy_svg.BoxySVG/master/com.boxy_svg.BoxySVG.yaml | grep 'url: https://storage.boxy-svg.com/linux' | sed 's/.*url: //g' | tr '?-' '\n' | grep '\.zip$') | ||
all_url="https://firebasestorage.googleapis.com/v0/b/boxy-svg.appspot.com/o/linux%2Fapp-${webVer}?alt=media" | ||
version=$(wget -qO- https://raw.githubusercontent.com/flathub/com.boxy_svg.BoxySVG/master/com.boxy_svg.BoxySVG.yaml | grep 'url: https://storage.boxy-svg.com/flathub' | sed 's/.*url: //g' | tr '?-' '\n' | grep '\.zip$') | ||
all_url="https://storage.boxy-svg.com/flathub/app-${version}" | ||
|
||
# use custom updater due to firebasestorage.googleapis.com not allowing URL verification | ||
# if the URL is not valid, this will updating this app will fail testing the install script in the github actions updater | ||
|
||
# make sure webVer variable is supplied by the sourcing script | ||
if [ -n "$webVer" ]; then | ||
version_number="" | ||
# echo the versions | ||
status "The latest online version is: $webVer" | ||
|
||
if [ -z "$pi_apps_ver" ] && [ -n "$all_url" ] && [ -f install ]; then | ||
pi_apps_ver="$(cat 'install' | grep -m 1 "version${version_number}=" | sed "s/version${version_number}=//" | xargs)" | ||
fi | ||
|
||
# install exists and all_url is used | ||
if [ -n "$pi_apps_ver" ] && [ -n "$all_url" ] && [ -a "$DIRECTORY/apps/$app_name/install" ]; then | ||
status "The current version in Pi-Apps install is: $pi_apps_ver" | ||
if [[ "$pi_apps_ver" = "$webVer" ]]; then | ||
#If the version is current do: | ||
status "Pi-Apps install version for $app_name is current!" | ||
else | ||
status_green "Updating pi-apps $app_name install to: $all_url" | ||
sed -i "0,/version${version_number}=.*/s;;version${version_number}=${webVer};g" install | ||
echo "- $app_name-all: $pi_apps_ver -> ${webVer} " >> /tmp/updated_apps | ||
fi | ||
fi | ||
|
||
else | ||
warning "webVer variable is missing for $app_name update script, please fix this script, skipping update check." | ||
echo '![badge-issue][badge-issue]'" webVer variable is missing for $app_name update script, please fix this script, skipping update check." >> /tmp/failed_apps | ||
fi | ||
|
||
unset webVer | ||
unset pi_apps_ver | ||
unset all_url | ||
source $GITHUB_WORKSPACE/.github/workflows/update_github_script.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters