Skip to content

Commit

Permalink
Boxy SVG: update to 4.37.0
Browse files Browse the repository at this point in the history
  • Loading branch information
theofficialgman committed Aug 24, 2024
1 parent 2effca3 commit df6b4a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 38 deletions.
39 changes: 3 additions & 36 deletions .github/workflows/updates/Boxy SVG.sh
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
4 changes: 2 additions & 2 deletions apps/Boxy SVG/install
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

version=4.35.0.zip
version=4.37.0.zip

install_packages libfontconfig-dev || exit 0

Expand All @@ -10,7 +10,7 @@ install_packages libfontconfig-dev || exit 0
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"

wget -O /tmp/boxy-svg.zip "https://storage.boxy-svg.com/linux/app-${version}" || exit 1
wget -O /tmp/boxy-svg.zip "https://storage.boxy-svg.com/flathub/app-${version}" || exit 1

rm -rf /tmp/app
cd /tmp
Expand Down

0 comments on commit df6b4a9

Please sign in to comment.