Skip to content

Commit 80441ff

Browse files
authored
Add appimageupdatetool support / remove zsync (#1394)
NOTE, only the command is added. If the AppImage supports delta updates, appimageupdatetool will be used as default... otherwise version comparison will be used. This change is also to incentivize users to push upstream developers to implement delta updates. Also removed zsync references to standardize this group of scripts. This commit also solves an issue on updating some apps with a broken AM-updater script.
1 parent b4ed9d9 commit 80441ff

File tree

1,837 files changed

+17593
-12615
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,837 files changed

+17593
-12615
lines changed

programs/aarch64/cheatbreaker

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ version=$(wget -q https://repology.org/project/cheatbreaker/versions -O - | grep
3838
if command -v appimageupdatetool >/dev/null 2>&1; then
3939
cd "/opt/$APP" || exit 1
4040
appimageupdatetool -Or ./"$APP" && chmod a+x ./"$APP" && echo "$version" > ./version && exit 0
41-
[ -e ../*.zsync ] && wget "$version.zsync" 2>/dev/null || { wget "$(curl -Ls https://cheatbreaker.net/download | tr '">< ' '\n' | grep -i "^http.*arm64.*appimage$")" || exit 1; }
41+
fi
4242
if [ "$version" != "$version0" ]; then
4343
mkdir "/opt/$APP/tmp" && cd "/opt/$APP/tmp" || exit 1
4444
notify-send "A new version of $APP is available, please wait"
45-
wget "$version" || exit 1
45+
wget "$(curl -Ls https://cheatbreaker.net/download | tr '">< ' '\n' | grep -i "^http.*arm64.*appimage$")" || exit 1
4646
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
4747
cd ..
4848
mv --backup=t ./tmp/*mage ./"$APP"

programs/x86_64/432hz-player

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ chmod a+x ../remove || exit 1
1414
# DOWNLOAD AND PREPARE THE APP, $version is also used for updates
1515
version=$(curl -Ls https://api.github.com/repos/mysteryx93/NaturalGroundingPlayer/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*player.*x64.*mage$" | head -1)
1616
wget "$version" || exit 1
17-
#wget "$version.zsync" 2> /dev/null # Comment out this line if you want to use zsync
17+
# Keep this space in sync with other installation scripts
1818
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
1919
cd ..
2020
mv ./tmp/*mage ./"$APP"
21-
mv ./tmp/*.zsync ./"$APP".zsync 2>/dev/null
21+
# Keep this space in sync with other installation scripts
2222
rm -R -f ./tmp || exit 1
2323
echo "$version" > ./version
2424
chmod a+x ./"$APP" || exit 1
@@ -35,14 +35,17 @@ SITE="mysteryx93/NaturalGroundingPlayer"
3535
version0=$(cat "/opt/$APP/version")
3636
version=$(curl -Ls https://api.github.com/repos/mysteryx93/NaturalGroundingPlayer/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*player.*x64.*mage$" | head -1)
3737
[ -n "$version" ] || { echo "Error getting link"; exit 1; }
38-
if [ "$version" != "$version0" ] || [ -e /opt/"$APP"/*.zsync ]; then
38+
if command -v appimageupdatetool >/dev/null 2>&1; then
39+
cd "/opt/$APP" || exit 1
40+
appimageupdatetool -Or ./"$APP" && chmod a+x ./"$APP" && echo "$version" > ./version && exit 0
41+
fi
42+
if [ "$version" != "$version0" ]; then
3943
mkdir "/opt/$APP/tmp" && cd "/opt/$APP/tmp" || exit 1
40-
[ -e ../*.zsync ] || notify-send "A new version of $APP is available, please wait"
41-
[ -e ../*.zsync ] && wget "$version.zsync" 2>/dev/null || { wget "$version" || exit 1; }
44+
notify-send "A new version of $APP is available, please wait"
45+
wget "$version" || exit 1
4246
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
4347
cd ..
44-
mv ./tmp/*.zsync ./"$APP".zsync 2>/dev/null || mv --backup=t ./tmp/*mage ./"$APP"
45-
[ -e ./*.zsync ] && { zsync ./"$APP".zsync || notify-send -u critical "zsync failed to update $APP"; }
48+
mv --backup=t ./tmp/*mage ./"$APP"
4649
chmod a+x ./"$APP" || exit 1
4750
echo "$version" > ./version
4851
rm -R -f ./*zs-old ./*.part ./tmp ./*~

programs/x86_64/86box

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ chmod a+x ../remove || exit 1
1414
# DOWNLOAD AND PREPARE THE APP, $version is also used for updates
1515
version=$(curl -Ls https://api.github.com/repos/86Box/86Box/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*x86_64.*mage$" | head -1)
1616
wget "$version" || exit 1
17-
#wget "$version.zsync" 2> /dev/null # Comment out this line if you want to use zsync
17+
# Keep this space in sync with other installation scripts
1818
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
1919
cd ..
2020
mv ./tmp/*mage ./"$APP"
21-
mv ./tmp/*.zsync ./"$APP".zsync 2>/dev/null
21+
# Keep this space in sync with other installation scripts
2222
rm -R -f ./tmp || exit 1
2323
echo "$version" > ./version
2424
chmod a+x ./"$APP" || exit 1
@@ -35,14 +35,17 @@ SITE="86Box/86Box"
3535
version0=$(cat "/opt/$APP/version")
3636
version=$(curl -Ls https://api.github.com/repos/86Box/86Box/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*x86_64.*mage$" | head -1)
3737
[ -n "$version" ] || { echo "Error getting link"; exit 1; }
38-
if [ "$version" != "$version0" ] || [ -e /opt/"$APP"/*.zsync ]; then
38+
if command -v appimageupdatetool >/dev/null 2>&1; then
39+
cd "/opt/$APP" || exit 1
40+
appimageupdatetool -Or ./"$APP" && chmod a+x ./"$APP" && echo "$version" > ./version && exit 0
41+
fi
42+
if [ "$version" != "$version0" ]; then
3943
mkdir "/opt/$APP/tmp" && cd "/opt/$APP/tmp" || exit 1
40-
[ -e ../*.zsync ] || notify-send "A new version of $APP is available, please wait"
41-
[ -e ../*.zsync ] && wget "$version.zsync" 2>/dev/null || { wget "$version" || exit 1; }
44+
notify-send "A new version of $APP is available, please wait"
45+
wget "$version" || exit 1
4246
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
4347
cd ..
44-
mv ./tmp/*.zsync ./"$APP".zsync 2>/dev/null || mv --backup=t ./tmp/*mage ./"$APP"
45-
[ -e ./*.zsync ] && { zsync ./"$APP".zsync || notify-send -u critical "zsync failed to update $APP"; }
48+
mv --backup=t ./tmp/*mage ./"$APP"
4649
chmod a+x ./"$APP" || exit 1
4750
echo "$version" > ./version
4851
rm -R -f ./*zs-old ./*.part ./tmp ./*~

programs/x86_64/aaaaxy

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ chmod a+x ../remove || exit 1
1414
# DOWNLOAD AND PREPARE THE APP, $version is also used for updates
1515
version=$(curl -Ls https://api.github.com/repos/divVerent/aaaaxy/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | head -1)
1616
wget "$version" || exit 1
17-
#wget "$version.zsync" 2> /dev/null # Comment out this line if you want to use zsync
17+
# Keep this space in sync with other installation scripts
1818
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
1919
cd ..
2020
mv ./tmp/*mage ./"$APP"
21-
mv ./tmp/*.zsync ./"$APP".zsync 2>/dev/null
21+
# Keep this space in sync with other installation scripts
2222
rm -R -f ./tmp || exit 1
2323
echo "$version" > ./version
2424
chmod a+x ./"$APP" || exit 1
@@ -35,14 +35,17 @@ SITE="divVerent/aaaaxy"
3535
version0=$(cat "/opt/$APP/version")
3636
version=$(curl -Ls https://api.github.com/repos/divVerent/aaaaxy/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | head -1)
3737
[ -n "$version" ] || { echo "Error getting link"; exit 1; }
38-
if [ "$version" != "$version0" ] || [ -e /opt/"$APP"/*.zsync ]; then
38+
if command -v appimageupdatetool >/dev/null 2>&1; then
39+
cd "/opt/$APP" || exit 1
40+
appimageupdatetool -Or ./"$APP" && chmod a+x ./"$APP" && echo "$version" > ./version && exit 0
41+
fi
42+
if [ "$version" != "$version0" ]; then
3943
mkdir "/opt/$APP/tmp" && cd "/opt/$APP/tmp" || exit 1
40-
[ -e ../*.zsync ] || notify-send "A new version of $APP is available, please wait"
41-
[ -e ../*.zsync ] && wget "$version.zsync" 2>/dev/null || { wget "$version" || exit 1; }
44+
notify-send "A new version of $APP is available, please wait"
45+
wget "$version" || exit 1
4246
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
4347
cd ..
44-
mv ./tmp/*.zsync ./"$APP".zsync 2>/dev/null || mv --backup=t ./tmp/*mage ./"$APP"
45-
[ -e ./*.zsync ] && { zsync ./"$APP".zsync || notify-send -u critical "zsync failed to update $APP"; }
48+
mv --backup=t ./tmp/*mage ./"$APP"
4649
chmod a+x ./"$APP" || exit 1
4750
echo "$version" > ./version
4851
rm -R -f ./*zs-old ./*.part ./tmp ./*~

programs/x86_64/abiword

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ chmod a+x ../remove || exit 1
1414
# DOWNLOAD AND PREPARE THE APP, $version is also used for updates
1515
version=$(curl -Ls https://api.github.com/repos/ivan-hc/Abiword-appimage/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | head -1)
1616
wget "$version" || exit 1
17-
#wget "$version.zsync" 2> /dev/null # Comment out this line if you want to use zsync
17+
# Keep this space in sync with other installation scripts
1818
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
1919
cd ..
2020
mv ./tmp/*mage ./"$APP"
21-
mv ./tmp/*.zsync ./"$APP".zsync 2>/dev/null
21+
# Keep this space in sync with other installation scripts
2222
rm -R -f ./tmp || exit 1
2323
echo "$version" > ./version
2424
chmod a+x ./"$APP" || exit 1
@@ -39,14 +39,13 @@ if command -v appimageupdatetool >/dev/null 2>&1; then
3939
cd "/opt/$APP" || exit 1
4040
appimageupdatetool -Or ./"$APP" && chmod a+x ./"$APP" && echo "$version" > ./version && exit 0
4141
fi
42-
if [ "$version" != "$version0" ] || [ -e /opt/"$APP"/*.zsync ]; then
42+
if [ "$version" != "$version0" ]; then
4343
mkdir "/opt/$APP/tmp" && cd "/opt/$APP/tmp" || exit 1
44-
[ -e ../*.zsync ] || notify-send "A new version of $APP is available, please wait"
45-
[ -e ../*.zsync ] && wget "$version.zsync" 2>/dev/null || { wget "$version" || exit 1; }
44+
notify-send "A new version of $APP is available, please wait"
45+
wget "$version" || exit 1
4646
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
4747
cd ..
48-
mv ./tmp/*.zsync ./"$APP".zsync 2>/dev/null || mv --backup=t ./tmp/*mage ./"$APP"
49-
[ -e ./*.zsync ] && { zsync ./"$APP".zsync || notify-send -u critical "zsync failed to update $APP"; }
48+
mv --backup=t ./tmp/*mage ./"$APP"
5049
chmod a+x ./"$APP" || exit 1
5150
echo "$version" > ./version
5251
rm -R -f ./*zs-old ./*.part ./tmp ./*~

programs/x86_64/accessimap-lecteur-der

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ chmod a+x ../remove || exit 1
1414
# DOWNLOAD AND PREPARE THE APP, $version is also used for updates
1515
version=$(curl -Ls https://api.github.com/repos/makinacorpus/accessimap-lecteur-der/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -i "x86_64" | head -1)
1616
wget "$version" || exit 1
17-
#wget "$version.zsync" 2> /dev/null # Comment out this line if you want to use zsync
17+
# Keep this space in sync with other installation scripts
1818
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
1919
cd ..
2020
mv ./tmp/*mage ./"$APP"
21-
mv ./tmp/*.zsync ./"$APP".zsync 2>/dev/null
21+
# Keep this space in sync with other installation scripts
2222
rm -R -f ./tmp || exit 1
2323
echo "$version" > ./version
2424
chmod a+x ./"$APP" || exit 1
@@ -35,14 +35,17 @@ SITE="makinacorpus/accessimap-lecteur-der"
3535
version0=$(cat "/opt/$APP/version")
3636
version=$(curl -Ls https://api.github.com/repos/makinacorpus/accessimap-lecteur-der/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -i "x86_64" | head -1)
3737
[ -n "$version" ] || { echo "Error getting link"; exit 1; }
38-
if [ "$version" != "$version0" ] || [ -e /opt/"$APP"/*.zsync ]; then
38+
if command -v appimageupdatetool >/dev/null 2>&1; then
39+
cd "/opt/$APP" || exit 1
40+
appimageupdatetool -Or ./"$APP" && chmod a+x ./"$APP" && echo "$version" > ./version && exit 0
41+
fi
42+
if [ "$version" != "$version0" ]; then
3943
mkdir "/opt/$APP/tmp" && cd "/opt/$APP/tmp" || exit 1
40-
[ -e ../*.zsync ] || notify-send "A new version of $APP is available, please wait"
41-
[ -e ../*.zsync ] && wget "$version.zsync" 2>/dev/null || { wget "$version" || exit 1; }
44+
notify-send "A new version of $APP is available, please wait"
45+
wget "$version" || exit 1
4246
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
4347
cd ..
44-
mv ./tmp/*.zsync ./"$APP".zsync 2>/dev/null || mv --backup=t ./tmp/*mage ./"$APP"
45-
[ -e ./*.zsync ] && { zsync ./"$APP".zsync || notify-send -u critical "zsync failed to update $APP"; }
48+
mv --backup=t ./tmp/*mage ./"$APP"
4649
chmod a+x ./"$APP" || exit 1
4750
echo "$version" > ./version
4851
rm -R -f ./*zs-old ./*.part ./tmp ./*~

programs/x86_64/acreom

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ chmod a+x ../remove || exit 1
1414
# DOWNLOAD AND PREPARE THE APP, $version is also used for updates
1515
version=$(curl -Ls https://api.github.com/repos/Acreom/releases/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | head -1)
1616
wget "$version" || exit 1
17-
#wget "$version.zsync" 2> /dev/null # Comment out this line if you want to use zsync
17+
# Keep this space in sync with other installation scripts
1818
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
1919
cd ..
2020
mv ./tmp/*mage ./"$APP"
21-
mv ./tmp/*.zsync ./"$APP".zsync 2>/dev/null
21+
# Keep this space in sync with other installation scripts
2222
rm -R -f ./tmp || exit 1
2323
echo "$version" > ./version
2424
chmod a+x ./"$APP" || exit 1
@@ -35,14 +35,17 @@ SITE="Acreom/releases"
3535
version0=$(cat "/opt/$APP/version")
3636
version=$(curl -Ls https://api.github.com/repos/Acreom/releases/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | head -1)
3737
[ -n "$version" ] || { echo "Error getting link"; exit 1; }
38-
if [ "$version" != "$version0" ] || [ -e /opt/"$APP"/*.zsync ]; then
38+
if command -v appimageupdatetool >/dev/null 2>&1; then
39+
cd "/opt/$APP" || exit 1
40+
appimageupdatetool -Or ./"$APP" && chmod a+x ./"$APP" && echo "$version" > ./version && exit 0
41+
fi
42+
if [ "$version" != "$version0" ]; then
3943
mkdir "/opt/$APP/tmp" && cd "/opt/$APP/tmp" || exit 1
40-
[ -e ../*.zsync ] || notify-send "A new version of $APP is available, please wait"
41-
[ -e ../*.zsync ] && wget "$version.zsync" 2>/dev/null || { wget "$version" || exit 1; }
44+
notify-send "A new version of $APP is available, please wait"
45+
wget "$version" || exit 1
4246
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
4347
cd ..
44-
mv ./tmp/*.zsync ./"$APP".zsync 2>/dev/null || mv --backup=t ./tmp/*mage ./"$APP"
45-
[ -e ./*.zsync ] && { zsync ./"$APP".zsync || notify-send -u critical "zsync failed to update $APP"; }
48+
mv --backup=t ./tmp/*mage ./"$APP"
4649
chmod a+x ./"$APP" || exit 1
4750
echo "$version" > ./version
4851
rm -R -f ./*zs-old ./*.part ./tmp ./*~

programs/x86_64/actual

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ chmod a+x ../remove || exit 1
1414
# DOWNLOAD AND PREPARE THE APP, $version is also used for updates
1515
version=$(curl -Ls https://api.github.com/repos/actualbudget/releases/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | head -1)
1616
wget "$version" || exit 1
17-
#wget "$version.zsync" 2> /dev/null # Comment out this line if you want to use zsync
17+
# Keep this space in sync with other installation scripts
1818
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
1919
cd ..
2020
mv ./tmp/*mage ./"$APP"
21-
mv ./tmp/*.zsync ./"$APP".zsync 2>/dev/null
21+
# Keep this space in sync with other installation scripts
2222
rm -R -f ./tmp || exit 1
2323
echo "$version" > ./version
2424
chmod a+x ./"$APP" || exit 1
@@ -35,14 +35,17 @@ SITE="actualbudget/releases"
3535
version0=$(cat "/opt/$APP/version")
3636
version=$(curl -Ls https://api.github.com/repos/actualbudget/releases/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | head -1)
3737
[ -n "$version" ] || { echo "Error getting link"; exit 1; }
38-
if [ "$version" != "$version0" ] || [ -e /opt/"$APP"/*.zsync ]; then
38+
if command -v appimageupdatetool >/dev/null 2>&1; then
39+
cd "/opt/$APP" || exit 1
40+
appimageupdatetool -Or ./"$APP" && chmod a+x ./"$APP" && echo "$version" > ./version && exit 0
41+
fi
42+
if [ "$version" != "$version0" ]; then
3943
mkdir "/opt/$APP/tmp" && cd "/opt/$APP/tmp" || exit 1
40-
[ -e ../*.zsync ] || notify-send "A new version of $APP is available, please wait"
41-
[ -e ../*.zsync ] && wget "$version.zsync" 2>/dev/null || { wget "$version" || exit 1; }
44+
notify-send "A new version of $APP is available, please wait"
45+
wget "$version" || exit 1
4246
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
4347
cd ..
44-
mv ./tmp/*.zsync ./"$APP".zsync 2>/dev/null || mv --backup=t ./tmp/*mage ./"$APP"
45-
[ -e ./*.zsync ] && { zsync ./"$APP".zsync || notify-send -u critical "zsync failed to update $APP"; }
48+
mv --backup=t ./tmp/*mage ./"$APP"
4649
chmod a+x ./"$APP" || exit 1
4750
echo "$version" > ./version
4851
rm -R -f ./*zs-old ./*.part ./tmp ./*~

programs/x86_64/admin-tools

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ chmod a+x ../remove || exit 1
1414
# DOWNLOAD AND PREPARE THE APP, $version is also used for updates
1515
version="$SITE"
1616
wget "$version" || exit 1
17-
wget "$version.zsync" 2>/dev/null
17+
# Keep this space in sync with other installation scripts
1818
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
1919
cd ..
2020
mv ./tmp/*mage ./"$APP"
21-
mv ./tmp/*.zsync ./"$APP".zsync 2>/dev/null
21+
# Keep this space in sync with other installation scripts
2222
rm -R -f ./tmp || exit 1
2323
echo "$version" > ./version
2424
chmod a+x ./"$APP" || exit 1
@@ -35,14 +35,17 @@ SITE="https://download.opensuse.org/repositories/home:/dmulder:/YaST:/AppImage/A
3535
version0=$(cat "/opt/$APP/version")
3636
version="$SITE"
3737
[ -n "$version" ] || { echo "Error getting link"; exit 1; }
38-
if [ "$version" != "$version0" ] || [ -e /opt/"$APP"/*.zsync ]; then
38+
if command -v appimageupdatetool >/dev/null 2>&1; then
39+
cd "/opt/$APP" || exit 1
40+
appimageupdatetool -Or ./"$APP" && chmod a+x ./"$APP" && echo "$version" > ./version && exit 0
41+
fi
42+
if [ "$version" != "$version0" ]; then
3943
mkdir "/opt/$APP/tmp" && cd "/opt/$APP/tmp" || exit 1
40-
[ -e ../*.zsync ] || notify-send "A new version of $APP is available, please wait"
41-
[ -e ../*.zsync ] && wget "$version.zsync" 2>/dev/null || { wget "$version" || exit 1; }
44+
notify-send "A new version of $APP is available, please wait"
45+
wget "$version" || exit 1
4246
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
4347
cd ..
44-
mv ./tmp/*.zsync ./"$APP".zsync 2>/dev/null || mv --backup=t ./tmp/*mage ./"$APP"
45-
[ -e ./*.zsync ] && { zsync ./"$APP".zsync || notify-send -u critical "zsync failed to update $APP"; }
48+
mv --backup=t ./tmp/*mage ./"$APP"
4649
chmod a+x ./"$APP" || exit 1
4750
echo "$version" > ./version
4851
rm -R -f ./*zs-old ./*.part ./tmp ./*~

programs/x86_64/advanced-passgen

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ chmod a+x ../remove || exit 1
1414
# DOWNLOAD AND PREPARE THE APP, $version is also used for updates
1515
version=$(curl -Ls https://api.github.com/repos/CodeDead/Advanced-PassGen/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | head -1)
1616
wget "$version" || exit 1
17-
#wget "$version.zsync" 2> /dev/null # Comment out this line if you want to use zsync
17+
# Keep this space in sync with other installation scripts
1818
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
1919
cd ..
2020
mv ./tmp/*mage ./"$APP"
21-
mv ./tmp/*.zsync ./"$APP".zsync 2>/dev/null
21+
# Keep this space in sync with other installation scripts
2222
rm -R -f ./tmp || exit 1
2323
echo "$version" > ./version
2424
chmod a+x ./"$APP" || exit 1
@@ -35,14 +35,17 @@ SITE="CodeDead/Advanced-PassGen"
3535
version0=$(cat "/opt/$APP/version")
3636
version=$(curl -Ls https://api.github.com/repos/CodeDead/Advanced-PassGen/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | head -1)
3737
[ -n "$version" ] || { echo "Error getting link"; exit 1; }
38-
if [ "$version" != "$version0" ] || [ -e /opt/"$APP"/*.zsync ]; then
38+
if command -v appimageupdatetool >/dev/null 2>&1; then
39+
cd "/opt/$APP" || exit 1
40+
appimageupdatetool -Or ./"$APP" && chmod a+x ./"$APP" && echo "$version" > ./version && exit 0
41+
fi
42+
if [ "$version" != "$version0" ]; then
3943
mkdir "/opt/$APP/tmp" && cd "/opt/$APP/tmp" || exit 1
40-
[ -e ../*.zsync ] || notify-send "A new version of $APP is available, please wait"
41-
[ -e ../*.zsync ] && wget "$version.zsync" 2>/dev/null || { wget "$version" || exit 1; }
44+
notify-send "A new version of $APP is available, please wait"
45+
wget "$version" || exit 1
4246
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
4347
cd ..
44-
mv ./tmp/*.zsync ./"$APP".zsync 2>/dev/null || mv --backup=t ./tmp/*mage ./"$APP"
45-
[ -e ./*.zsync ] && { zsync ./"$APP".zsync || notify-send -u critical "zsync failed to update $APP"; }
48+
mv --backup=t ./tmp/*mage ./"$APP"
4649
chmod a+x ./"$APP" || exit 1
4750
echo "$version" > ./version
4851
rm -R -f ./*zs-old ./*.part ./tmp ./*~

0 commit comments

Comments
 (0)