2
2
3
3
# AM INSTALL SCRIPT VERSION 3.5
4
4
set -u
5
- APP=appium-desktop
6
- SITE=" appium/appium-desktop "
5
+ APP=appium-inspector
6
+ SITE=" appium/appium-inspector "
7
7
8
8
# CREATE DIRECTORIES AND ADD REMOVER
9
9
[ -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
12
12
chmod a+x ../remove || exit 1
13
13
14
14
# DOWNLOAD AND PREPARE THE APP, $version is also used for updates
15
- version=$( curl -Ls https://api.github.com/repos/appium/appium-desktop /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/appium/appium-inspector /releases | sed ' s/[()",{} ]/\n/g' | grep -oi " https.*mage$" | grep -vi " i386\|i686\|aarch64\|arm64\|armv7l" | head -1)
16
16
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
18
18
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
19
19
cd ..
20
20
mv ./tmp/* mage ./" $APP "
21
- mv ./tmp/ * .zsync ./ " $APP " .zsync 2> /dev/null
21
+ # Keep this space in sync with other installation scripts
22
22
rm -R -f ./tmp || exit 1
23
23
echo " $version " > ./version
24
24
chmod a+x ./" $APP " || exit 1
@@ -30,19 +30,22 @@ ln -s "/opt/$APP/$APP" "/usr/local/bin/$APP"
30
30
cat >> ./AM-updater << 'EOF '
31
31
#!/bin/sh
32
32
set -u
33
- APP=appium-desktop
34
- SITE="appium/appium-desktop "
33
+ APP=appium-inspector
34
+ SITE="appium/appium-inspector "
35
35
version0=$(cat "/opt/$APP/version")
36
- version=$(curl -Ls https://api.github.com/repos/appium/appium-desktop /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/appium/appium-inspector /releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | head -1)
37
37
[ -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
39
43
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
42
46
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
43
47
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"
46
49
chmod a+x ./"$APP" || exit 1
47
50
echo "$version" > ./version
48
51
rm -R -f ./*zs-old ./*.part ./tmp ./*~
0 commit comments