33# AM INSTALL SCRIPT VERSION 3.5
44set -u
55APP=vikunja
6- SITE=" https:// vikunja.io "
6+ SITE=" go-vikunja/ vikunja"
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,8 +12,8 @@ printf '\n%s' "rm -f /usr/local/share/applications/$APP-AM.desktop" >> ../remove
1212chmod a+x ../remove || exit 1
1313
1414# DOWNLOAD AND PREPARE THE APP, $version is also used for updates
15- version=$( curl -Ls https://dl.vikunja.io/desktop | grep class | grep name | head -1 | grep -o -P ' (?<=>).*(?=<) ' )
16- wget " https://dl.vikunja.io/desktop/ $version /Vikunja%20Desktop-v $version .AppImage " || exit 1
15+ version=$( curl -Ls https://api.github.com/repos/go-vikunja/vikunja/releases | sed ' s/[()",{} ]/\n/g ' | grep -oi " https.*mage$ " | grep -vi " i386\|i686\|aarch64\|arm64\|armv7l " | head -1 )
16+ wget " $version " || exit 1
1717# 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.
1919cd ..
@@ -31,9 +31,9 @@ cat >> ./AM-updater << 'EOF'
3131#!/bin/sh
3232set -u
3333APP=vikunja
34- SITE="https:// vikunja.io "
34+ SITE="go-vikunja/ vikunja"
3535version0=$(cat "/opt/$APP/version")
36- version=$(curl -Ls https://dl.vikunja.io/desktop | grep class | grep name | head -1 | grep -o -P '(?<=>).*(?=<)' )
36+ version=$(curl -Ls https://api.github.com/repos/go-vikunja/vikunja/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; }
3838if command -v appimageupdatetool >/dev/null 2>&1; then
3939 cd "/opt/$APP" || exit 1
4242if [ "$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 "https://dl.vikunja.io/desktop/ $version/Vikunja%20Desktop-v$version.AppImage " || exit 1
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 ..
4848 mv --backup=t ./tmp/*mage ./"$APP"
0 commit comments