Skip to content
This repository was archived by the owner on May 30, 2025. It is now read-only.

Commit fb12b7e

Browse files
authored
Update brave-appimage
- fall back on the beta version immediately preceding the stable version if the latter is not present see srevinsaju/Brave-AppImage#14 and srevinsaju/Brave-AppImage#16 for more context
1 parent d55eec9 commit fb12b7e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

programs/x86_64/brave-appimage

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ chmod a+x ../remove || exit 1
1313

1414
# DOWNLOAD AND PREPARE THE APP, $version is also used for updates
1515
version=$(curl -Ls https://api.github.com/repos/srevinsaju/Brave-AppImage/releases/latest | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | grep -i "stable" | head -1)
16+
[ -z "$version" ] && version=$(curl -Ls https://api.github.com/repos/srevinsaju/Brave-AppImage/releases?per_page=100 | tr '[]{}' '\n' | grep -i "stable\|beta" | awk '/Stable/,0' | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | head -1)
1617
wget "$version" || exit 1
1718
# Keep this space in sync with other installation scripts
1819
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
@@ -35,7 +36,7 @@ SITE="srevinsaju/Brave-AppImage"
3536
version0=$(cat "/opt/$APP/version")
3637
version=$(curl -Ls https://api.github.com/repos/srevinsaju/Brave-AppImage/releases/latest | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | grep -i "stable" | head -1)
3738
[ -n "$version" ] || { echo "Error getting link"; exit 1; }
38-
if command -v appimageupdatetool >/dev/null 2>&1; then
39+
if ! echo "$version0" | grep -qi "beta" && command -v appimageupdatetool >/dev/null 2>&1; then
3940
cd "/opt/$APP" || exit 1
4041
appimageupdatetool -Or ./"$APP" && chmod a+x ./"$APP" && echo "$version" > ./version && exit 0
4142
fi

0 commit comments

Comments
 (0)