Skip to content

Commit fd7ce1b

Browse files
authored
Merge pull request #1363 from Samueru-sama/patch-30
update `prusa-slicer` to working fork
2 parents 6bca886 + b26a74e commit fd7ce1b

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

programs/x86_64/prusa-slicer

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# AM INSTALL SCRIPT VERSION 3.5
44
set -u
55
APP=prusa-slicer
6-
SITE="prusa3d/PrusaSlicer"
6+
SITE="probonopd/PrusaSlicer"
77

88
# CREATE DIRECTORIES AND ADD REMOVER
99
[ -n "$APP" ] && mkdir -p "/opt/$APP/tmp" "/opt/$APP/icons" && cd "/opt/$APP/tmp" || exit 1
@@ -12,13 +12,13 @@ printf '\n%s' "rm -f /usr/local/share/applications/$APP-AM.desktop" >> ../remove
1212
chmod a+x ../remove || exit 1
1313

1414
# DOWNLOAD AND PREPARE THE APP, $version is also used for updates
15-
version=$(curl -Ls https://api.github.com/repos/prusa3d/PrusaSlicer/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | head -1)
15+
version=$(curl -Ls https://api.github.com/repos/probonopd/PrusaSlicer/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
@@ -31,18 +31,21 @@ cat >> ./AM-updater << 'EOF'
3131
#!/bin/sh
3232
set -u
3333
APP=prusa-slicer
34-
SITE="prusa3d/PrusaSlicer"
34+
SITE="probonopd/PrusaSlicer"
3535
version0=$(cat "/opt/$APP/version")
36-
version=$(curl -Ls https://api.github.com/repos/prusa3d/PrusaSlicer/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | head -1)
36+
version=$(curl -Ls https://api.github.com/repos/probonopd/PrusaSlicer/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)